summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/resmokelib/core/programs.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py
index 8d5e4c622ca..2739f057ce1 100644
--- a/buildscripts/resmokelib/core/programs.py
+++ b/buildscripts/resmokelib/core/programs.py
@@ -106,7 +106,7 @@ def get_default_log_component_verbosity_for_mongod(executable):
return default_mongod_log_component_verbosity()
-def mongod_program( # pylint: disable=too-many-branches
+def mongod_program( # pylint: disable=too-many-branches,too-many-statements
logger, executable=None, process_kwargs=None, **kwargs):
"""Return a Process instance that starts mongod arguments constructed from 'kwargs'."""
@@ -125,6 +125,14 @@ def mongod_program( # pylint: disable=too-many-branches
suite_set_parameters[
"logComponentVerbosity"] = get_default_log_component_verbosity_for_mongod(executable)
+ # minNumChunksForSessionsCollection controls the minimum number of chunks the balancer will
+ # enforce for the sessions collection. If the actual number of chunks is less, the balancer will
+ # issue split commands to create more chunks. As a result, the balancer will also end up moving
+ # chunks for the sessions collection to balance the chunks across shards. Unless the suite is
+ # explicitly prepared to handle these background migrations, set the parameter to 1.
+ if "configsvr" in kwargs and "minNumChunksForSessionsCollection" not in suite_set_parameters:
+ suite_set_parameters["minNumChunksForSessionsCollection"] = 1
+
# orphanCleanupDelaySecs controls an artificial delay before cleaning up an orphaned chunk
# that has migrated off of a shard, meant to allow most dependent queries on secondaries to
# complete first. It defaults to 900, or 15 minutes, which is prohibitively long for tests.