summaryrefslogtreecommitdiff
path: root/jstests/sharding/top_chunk_autosplit.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-06-29 11:13:09 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-06-29 15:00:16 -0400
commit7f736859d32f9237aa382a676644082a9f66a45d (patch)
treec083e482de7f58f30ff854fcc76d5525c85f3eaa /jstests/sharding/top_chunk_autosplit.js
parentb65ddcd7868eecdec66255cae14596c479e5d316 (diff)
downloadmongo-7f736859d32f9237aa382a676644082a9f66a45d.tar.gz
SERVER-24720/SERVER-24782 Move serverStatus.balancer to a balancerStatus command
This change gets rid of the serverStatus.balancer section and moves its functionality to a new balancer command called 'balancerStatus'. In addition it gets rid of the 'controlBalancer' command and splits it into two commands - balancerStart and balancerStop.
Diffstat (limited to 'jstests/sharding/top_chunk_autosplit.js')
-rw-r--r--jstests/sharding/top_chunk_autosplit.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/sharding/top_chunk_autosplit.js b/jstests/sharding/top_chunk_autosplit.js
index 5d23386230c..6047e7a948c 100644
--- a/jstests/sharding/top_chunk_autosplit.js
+++ b/jstests/sharding/top_chunk_autosplit.js
@@ -2,10 +2,9 @@ function shardSetup(shardConfig, dbName, collName) {
var st = new ShardingTest(shardConfig);
var db = st.getDB(dbName);
- // Disable the balancer to not interfere with the test, but keep the balancer settings on
- // (with default empty document) so the auto split logic will be able to move chunks around.
- assert.writeOK(st.s.getDB('config').settings.remove({_id: 'balancer'}));
- db.adminCommand({configureFailPoint: 'skipBalanceRound', mode: 'alwaysOn'});
+ // Set the balancer mode to only balance on autoSplit
+ assert.writeOK(st.s.getDB('config').settings.update(
+ {_id: 'balancer'}, {'$unset': {stopped: ''}, '$set': {mode: 'autoSplitOnly'}}));
return st;
}