summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_libs/cluster.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency/fsm_libs/cluster.js')
-rw-r--r--jstests/concurrency/fsm_libs/cluster.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_libs/cluster.js b/jstests/concurrency/fsm_libs/cluster.js
index 1194410023b..078f73bcdc5 100644
--- a/jstests/concurrency/fsm_libs/cluster.js
+++ b/jstests/concurrency/fsm_libs/cluster.js
@@ -40,6 +40,7 @@ var Cluster = function(options) {
'sameDB',
'setupFunctions',
'sharded.enabled',
+ 'sharded.enableAutoSplit',
'sharded.enableBalancer',
'sharded.numMongos',
'sharded.numShards',
@@ -53,6 +54,12 @@ var Cluster = function(options) {
tojson(allowedKeys));
});
+ options.sharded.enableAutoSplit = options.sharded.enableAutoSplit || false;
+ assert.eq('boolean', typeof options.sharded.enableAutoSplit);
+
+ options.sharded.enableBalancer = options.sharded.enableBalancer || false;
+ assert.eq('boolean', typeof options.sharded.enableBalancer);
+
options.masterSlave = options.masterSlave || false;
assert.eq('boolean', typeof options.masterSlave);
@@ -193,7 +200,10 @@ var Cluster = function(options) {
shards: options.sharded.numShards,
mongos: options.sharded.numMongos,
verbose: verbosityLevel,
- other: {enableBalancer: options.sharded.enableBalancer}
+ other: {
+ enableAutoSplit: options.sharded.enableAutoSplit,
+ enableBalancer: options.sharded.enableBalancer,
+ }
};
// TODO: allow 'options' to specify an 'rs' config
@@ -463,6 +473,10 @@ var Cluster = function(options) {
return this.isSharded() && options.sharded.enableBalancer;
};
+ this.isAutoSplitEnabled = function isAutoSplitEnabled() {
+ return this.isSharded() && options.sharded.enableAutoSplit;
+ };
+
this.validateAllCollections = function validateAllCollections(phase) {
assert(initialized, 'cluster must be initialized first');