diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-01-29 14:32:59 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-01-29 18:28:47 -0500 |
commit | 242b2247bdff32b536aaad36d92f963e4f8c959c (patch) | |
tree | c29da409e5e203ef1c82550c158c842c70591049 /src/mongo/db/sorter | |
parent | 791d6d40fc94eaa7264bce319aab94d98d20df4c (diff) | |
download | mongo-242b2247bdff32b536aaad36d92f963e4f8c959c.tar.gz |
SERVER-11239 Rename flag to allowDiskUse and include in error messages
Diffstat (limited to 'src/mongo/db/sorter')
-rw-r--r-- | src/mongo/db/sorter/sorter.cpp | 20 |
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(); |