summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2020-02-10 22:45:45 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-11 04:29:42 +0000
commitb48cb5d8e2a8ccab0f4be401cc2533e5c2b650ae (patch)
treeb1e5792fe0db85d4b6d09f4d47cb15acbe6df641 /src/mongo
parent9f40a2e96b3ad0e5fc84956c153a938ed531e91f (diff)
downloadmongo-b48cb5d8e2a8ccab0f4be401cc2533e5c2b650ae.tar.gz
Revert "SERVER-44984 reduce index build thread pool default and index build external sort memory limit default"
This reverts commit 0be749a16f4523b2a23729e0754a89ba5ea99644.
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/catalog/multi_index_block.idl6
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.cpp6
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.h1
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod_test.cpp10
4 files changed, 5 insertions, 18 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.idl b/src/mongo/db/catalog/multi_index_block.idl
index 311a7f701f1..08b183e3560 100644
--- a/src/mongo/db/catalog/multi_index_block.idl
+++ b/src/mongo/db/catalog/multi_index_block.idl
@@ -52,12 +52,12 @@ server_parameters:
default: true
maxIndexBuildMemoryUsageMegabytes:
- description: "Limits the amount of memory that simultaneous index builds on one collection may consume for the duration of the builds"
+ description: "Limits the amount of memory that simultaneous foreground index builds on one collection may consume for the duration of the builds"
set_at:
- runtime
- startup
cpp_varname: maxIndexBuildMemoryUsageMegabytes
cpp_vartype: AtomicWord<int>
- default: 200
+ default: 500
validator:
- gte: 50
+ gte: 100
diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp
index 9bd0f46bfb9..cc915a7a6c3 100644
--- a/src/mongo/db/index_builds_coordinator_mongod.cpp
+++ b/src/mongo/db/index_builds_coordinator_mongod.cpp
@@ -64,7 +64,7 @@ ThreadPool::Options makeDefaultThreadPoolOptions() {
// We depend on thread pool sizes being equal between primaries and secondaries. If a secondary
// has fewer resources than a primary, index build oplog entries can replicate in an order that
// the secondary is unable to fulfill, leading to deadlocks. See SERVER-44250.
- options.maxThreads = 3;
+ options.maxThreads = 10;
// Ensure all threads have a client.
options.onCreateThread = [](const std::string& threadName) {
@@ -80,10 +80,6 @@ IndexBuildsCoordinatorMongod::IndexBuildsCoordinatorMongod()
: _threadPool(makeDefaultThreadPoolOptions()) {
_threadPool.startup();
}
-IndexBuildsCoordinatorMongod::IndexBuildsCoordinatorMongod(ThreadPool::Options options)
- : _threadPool(std::move(options)) {
- _threadPool.startup();
-}
void IndexBuildsCoordinatorMongod::shutdown() {
// Stop new scheduling.
diff --git a/src/mongo/db/index_builds_coordinator_mongod.h b/src/mongo/db/index_builds_coordinator_mongod.h
index e9569621d5e..20691de7751 100644
--- a/src/mongo/db/index_builds_coordinator_mongod.h
+++ b/src/mongo/db/index_builds_coordinator_mongod.h
@@ -55,7 +55,6 @@ public:
* Sets up the thread pool.
*/
IndexBuildsCoordinatorMongod();
- IndexBuildsCoordinatorMongod(ThreadPool::Options options);
/**
* Shuts down the thread pool, signals interrupt to all index builds, then waits for all of the
diff --git a/src/mongo/db/index_builds_coordinator_mongod_test.cpp b/src/mongo/db/index_builds_coordinator_mongod_test.cpp
index 64cf3c8c487..8a9939579b4 100644
--- a/src/mongo/db/index_builds_coordinator_mongod_test.cpp
+++ b/src/mongo/db/index_builds_coordinator_mongod_test.cpp
@@ -73,15 +73,7 @@ void IndexBuildsCoordinatorMongodTest::setUp() {
createCollection(_testFooNss, _testFooUUID);
createCollection(_testBarNss, _testBarUUID);
createCollection(_othertestFooNss, _othertestFooUUID);
-
- ThreadPool::Options options;
- options.poolName = "IndexBuildsCoordinatorMongod";
- options.minThreads = 0;
- options.maxThreads = 5;
- options.onCreateThread = [](const std::string& threadName) {
- Client::initThread(threadName.c_str());
- };
- _indexBuildsCoord = std::make_unique<IndexBuildsCoordinatorMongod>(options);
+ _indexBuildsCoord = std::make_unique<IndexBuildsCoordinatorMongod>();
}
void IndexBuildsCoordinatorMongodTest::tearDown() {