diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-12-22 14:04:48 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-12-27 11:26:52 -0500 |
commit | c76707775edcef041f3a83be2972a739236ef01b (patch) | |
tree | c20be551018c3dd241be4d1f47d116ce96fa98e0 | |
parent | c4e1e4bbcc1a6fc1f9ca4e3cbf524e6c9c99ce1a (diff) | |
download | mongo-c76707775edcef041f3a83be2972a739236ef01b.tar.gz |
SERVER-27406 Reduce DocumentSourceCursor batch size from 16MB to 4MB
-rw-r--r-- | jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js | 3 | ||||
-rw-r--r-- | src/mongo/db/pipeline/document_source_cursor.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/query/query_knobs.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/query/query_knobs.h | 2 |
4 files changed, 6 insertions, 9 deletions
diff --git a/jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js b/jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js index ba38bdfe94a..f15dbb05432 100644 --- a/jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js +++ b/jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js @@ -280,8 +280,9 @@ var $config = (function() { function teardown(db, collName, cluster) { cluster.executeOnMongodNodes(function lowerDocumentSourceCursorBatchSize(db) { + // Restore DocumentSourceCursor batch size to the default. assertAlways.commandWorked(db.adminCommand( - {setParameter: 1, internalDocumentSourceCursorBatchSizeBytes: 16 * 1024 * 1024})); + {setParameter: 1, internalDocumentSourceCursorBatchSizeBytes: 4 * 1024 * 1024})); }); var myDB = db.getSiblingDB(this.uniqueDBName); diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp index 61fd276c2ec..b8bacacf015 100644 --- a/src/mongo/db/pipeline/document_source_cursor.cpp +++ b/src/mongo/db/pipeline/document_source_cursor.cpp @@ -46,14 +46,6 @@ using boost::intrusive_ptr; using std::shared_ptr; using std::string; -namespace { - -MONGO_EXPORT_SERVER_PARAMETER(internalDocumentSourceCursorBatchSizeBytes, - int, - FindCommon::kMaxBytesToReturnToClientAtOnce); - -} // namespace - const char* DocumentSourceCursor::getSourceName() const { return "$cursor"; } diff --git a/src/mongo/db/query/query_knobs.cpp b/src/mongo/db/query/query_knobs.cpp index a05a1c073d8..496f69c5c47 100644 --- a/src/mongo/db/query/query_knobs.cpp +++ b/src/mongo/db/query/query_knobs.cpp @@ -72,4 +72,6 @@ MONGO_EXPORT_SERVER_PARAMETER(internalInsertMaxBatchSize, int, internalQueryExecYieldIterations / 2); +MONGO_EXPORT_SERVER_PARAMETER(internalDocumentSourceCursorBatchSizeBytes, int, 4 * 1024 * 1024); + } // namespace mongo diff --git a/src/mongo/db/query/query_knobs.h b/src/mongo/db/query/query_knobs.h index 4b3a0760c65..67bff82bb1e 100644 --- a/src/mongo/db/query/query_knobs.h +++ b/src/mongo/db/query/query_knobs.h @@ -113,4 +113,6 @@ extern std::atomic<int> internalQueryFacetBufferSizeBytes; // NOLINT extern std::atomic<int> internalInsertMaxBatchSize; // NOLINT +extern std::atomic<int> internalDocumentSourceCursorBatchSizeBytes; // NOLINT + } // namespace mongo |