diff options
author | Randolph Tan <randolph@10gen.com> | 2019-06-04 14:08:43 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2019-07-11 13:54:30 -0400 |
commit | baa002b18acb7647f085b70af07acb640e3aff0f (patch) | |
tree | f4d5bf2b3dc711ee1caaf47cb7e2c8d04a443ab6 /src/mongo/shell | |
parent | 1ed216bc95b6f6b75a3d02161312671745f8c974 (diff) | |
download | mongo-baa002b18acb7647f085b70af07acb640e3aff0f.tar.gz |
SERVER-41195 Turn off auto-splitting when the balancer is turned off
(cherry picked from commit 68fd498481f7427cc780d270b27636f69bb1add8)
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/shardingtest.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js index 4ee608d1852..f814a02cbf4 100644 --- a/src/mongo/shell/shardingtest.js +++ b/src/mongo/shell/shardingtest.js @@ -217,8 +217,12 @@ var ShardingTest = function(params) { if (!otherParams.enableBalancer) { self.stopBalancer(); } + if (!otherParams.enableAutoSplit) { self.disableAutoSplit(); + } else if (!otherParams.enableBalancer) { + // Turn on autoSplit since disabling balancer also turns auto split off. + self.enableAutoSplit(); } } @@ -1564,6 +1568,8 @@ var ShardingTest = function(params) { // the instances and then log them out again. if (keyFile) { authutil.asCluster(this._mongos, keyFile, _configureCluster); + } else if (mongosOptions[0] && mongosOptions[0].keyFile) { + authutil.asCluster(this._mongos, mongosOptions[0].keyFile, _configureCluster); } else { _configureCluster(); } |