summaryrefslogtreecommitdiff
path: root/src/mongo/db/sorter/sorter.cpp
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/sorter/sorter.cpp
parent791d6d40fc94eaa7264bce319aab94d98d20df4c (diff)
downloadmongo-242b2247bdff32b536aaad36d92f963e4f8c959c.tar.gz
SERVER-11239 Rename flag to allowDiskUse and include in error messages
Diffstat (limited to 'src/mongo/db/sorter/sorter.cpp')
-rw-r--r--src/mongo/db/sorter/sorter.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp
index 3539e07984c..c2a39a1e0b2 100644
--- a/src/mongo/db/sorter/sorter.cpp
+++ b/src/mongo/db/sorter/sorter.cpp
@@ -448,11 +448,17 @@ namespace mongo {
if (_data.empty())
return;
- if (!_opts.extSortAllowed)
+ if (!_opts.extSortAllowed) {
+ // XXX This error message is only correct for aggregation, but it is also the
+ // only way this code could be hit at the moment. If the Sorter is used
+ // elsewhere where extSortAllowed could possibly be false, this message will
+ // need to be revisited.
uasserted(16819, str::stream()
<< "Sort exceeded memory limit of " << _opts.maxMemoryUsageBytes
- << " bytes, but did not opt-in to external sorting. Aborting operation."
+ << " bytes, but did not opt in to external sorting. Aborting operation."
+ << " Pass allowDiskUse:true to opt in."
);
+ }
sort();
@@ -713,11 +719,17 @@ namespace mongo {
if (_data.empty())
return;
- if (!_opts.extSortAllowed)
+ if (!_opts.extSortAllowed) {
+ // XXX This error message is only correct for aggregation, but it is also the
+ // only way this code could be hit at the moment. If the Sorter is used
+ // elsewhere where extSortAllowed could possibly be false, this message will
+ // need to be revisited.
uasserted(16820, str::stream()
<< "Sort exceeded memory limit of " << _opts.maxMemoryUsageBytes
- << " bytes, but did not opt-in to external sorting. Aborting operation."
+ << " bytes, but did not opt in to external sorting. Aborting operation."
+ << " Pass allowDiskUse:true to opt in."
);
+ }
sort();
updateCutoff();