diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-11-13 17:36:27 -0500 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-11-17 16:42:14 -0500 |
commit | 8344af630c5113ab2f9cf2950c384ad926966ff9 (patch) | |
tree | ab41398a0c66a4db870ebf8ef105ce172b192754 /src/mongo/db/commands/mr.cpp | |
parent | d2adb8eda7fae11b423696e1101e7d0642e19895 (diff) | |
download | mongo-8344af630c5113ab2f9cf2950c384ad926966ff9.tar.gz |
SERVER-21459 reserve bytes in ReplyBuilder buffer to avoid excessive reallocing
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r-- | src/mongo/db/commands/mr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 1d9a52067fa..2d050c924f1 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -55,6 +55,7 @@ #include "mongo/db/operation_context_impl.h" #include "mongo/db/query/get_executor.h" #include "mongo/db/query/query_planner.h" +#include "mongo/db/query/find_common.h" #include "mongo/db/range_preserver.h" #include "mongo/db/repl/replication_coordinator_global.h" #include "mongo/db/s/collection_metadata.h" @@ -1251,6 +1252,10 @@ public: return true; } + std::size_t reserveBytesForReply() const override { + return FindCommon::kInitReplyBufferSize; + } + virtual void help(stringstream& help) const { help << "Run a map/reduce operation on the server.\n"; help << "Note this is used for aggregation, not querying, in MongoDB.\n"; |