summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-01-29 14:32:59 -0500
committerMathias Stearn <mathias@10gen.com>2014-01-29 18:28:47 -0500
commit242b2247bdff32b536aaad36d92f963e4f8c959c (patch)
treec29da409e5e203ef1c82550c158c842c70591049 /src/mongo/db/pipeline
parent791d6d40fc94eaa7264bce319aab94d98d20df4c (diff)
downloadmongo-242b2247bdff32b536aaad36d92f963e4f8c959c.tar.gz
SERVER-11239 Rename flag to allowDiskUse and include in error messages
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/document_source_group.cpp3
-rw-r--r--src/mongo/db/pipeline/pipeline.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp
index b5350f61fa5..30ea3d1504e 100644
--- a/src/mongo/db/pipeline/document_source_group.cpp
+++ b/src/mongo/db/pipeline/document_source_group.cpp
@@ -362,7 +362,8 @@ namespace mongo {
// This loop consumes all input from pSource and buckets it based on pIdExpression.
while (boost::optional<Document> input = pSource->getNext()) {
if (memoryUsageBytes > _maxMemoryUsageBytes) {
- uassert(16945, "Exceeded memory limit for $group, but didn't allow external sort",
+ uassert(16945, "Exceeded memory limit for $group, but didn't allow external sort."
+ " Pass allowDiskUse:true to opt in.",
_extSortAllowed);
sortedFiles.push_back(spill());
memoryUsageBytes = 0;
diff --git a/src/mongo/db/pipeline/pipeline.cpp b/src/mongo/db/pipeline/pipeline.cpp
index 5daa8b3df3b..65be93fd587 100644
--- a/src/mongo/db/pipeline/pipeline.cpp
+++ b/src/mongo/db/pipeline/pipeline.cpp
@@ -147,9 +147,9 @@ namespace mongo {
continue;
}
- if (str::equals(pFieldName, "allowDiskUsage")) {
+ if (str::equals(pFieldName, "allowDiskUse")) {
uassert(16949,
- str::stream() << "allowDiskUsage must be a bool, not a "
+ str::stream() << "allowDiskUse must be a bool, not a "
<< typeName(cmdElement.type()),
cmdElement.type() == Bool);
pCtx->extSortAllowed = cmdElement.Bool();
@@ -468,7 +468,7 @@ namespace mongo {
}
if (pCtx->extSortAllowed) {
- serialized.setField("allowDiskUsage", Value(true));
+ serialized.setField("allowDiskUse", Value(true));
}
return serialized.freeze();