diff options
author | Nathan Myers <nathan.myers@10gen.com> | 2017-01-15 23:53:29 -0500 |
---|---|---|
committer | Nathan Myers <nathan.myers@10gen.com> | 2017-01-23 17:06:29 -0500 |
commit | 94be1956ffa4af698132bd7d65f8b79092566897 (patch) | |
tree | 4d081a640df3ba50052a198226a29d4986a18950 /jstests | |
parent | eef6335bbc0eedeb6f50120164ca0f198fb94303 (diff) | |
download | mongo-94be1956ffa4af698132bd7d65f8b79092566897.tar.gz |
SERVER-27550 Delete dead balancer dist lock code
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/balancer_shell_commands.js | 13 | ||||
-rw-r--r-- | jstests/sharding/movechunk_interrupt_at_primary_stepdown.js | 15 |
2 files changed, 3 insertions, 25 deletions
diff --git a/jstests/sharding/balancer_shell_commands.js b/jstests/sharding/balancer_shell_commands.js index 13bb89335f6..48c5c7c489a 100644 --- a/jstests/sharding/balancer_shell_commands.js +++ b/jstests/sharding/balancer_shell_commands.js @@ -1,7 +1,6 @@ /** * Test shell balancer commands. * sh.setBalancerState - * sh.getBalancerLockDetails * sh.getBalancerState */ @@ -15,19 +14,13 @@ var db; assert(sh.getBalancerState(), "Balancer should have been enabled during cluster setup"); - // Test that the balancer can be disabled and the balancer lock is still locked. + // Test that the balancer can be disabled sh.setBalancerState(false); - var lock = sh.getBalancerLockDetails(); - assert.eq("balancer", lock._id); - assert.eq(2, lock.state); assert(!sh.getBalancerState(), "Failed to disable balancer"); - // Test that the balancer can be enabled and the balancer lock is still locked. + // Test that the balancer can be re-enabled sh.setBalancerState(true); - lock = sh.getBalancerLockDetails(); - assert.eq("balancer", lock._id); - assert.eq(2, lock.state); - assert(sh.getBalancerState(), "Failed to enable balancer"); + assert(sh.getBalancerState(), "Failed to re-enable balancer"); shardingTest.stop(); })(); diff --git a/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js b/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js index 5c8ec946907..99c42cb74fc 100644 --- a/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js +++ b/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js @@ -66,20 +66,5 @@ load('./jstests/libs/chunk_manipulation_util.js'); assert.eq(0, mongos.getDB('config').chunks.find({shard: st.shard0.shardName}).itcount()); assert.eq(1, mongos.getDB('config').chunks.find({shard: st.shard1.shardName}).itcount()); - // migrationCommitVersionError -- tell the shard that the migration cannot be committed - // because the collection version epochs do not match, meaning the collection has been dropped - // since the migration began, which means the Balancer must have lost the distributed lock for - // a time. - assert.commandWorked(st.configRS.getPrimary().getDB("admin").runCommand( - {configureFailPoint: 'migrationCommitVersionError', mode: 'alwaysOn'})); - - assert.commandFailedWithCode( - mongos.getDB("admin").runCommand( - {moveChunk: coll + "", find: {Key: 0}, to: st.shard0.shardName}), - ErrorCodes.StaleEpoch); - - assert.commandWorked(st.configRS.getPrimary().getDB("admin").runCommand( - {configureFailPoint: 'migrationCommitVersionError', mode: 'off'})); - st.stop(); })(); |