diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-03-27 11:52:31 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-05-01 17:33:16 -0400 |
commit | 9964889f0936441211cf065a15504cdc5973d646 (patch) | |
tree | e07142941580fbf54ffcb4014bf607a190a46d38 | |
parent | 8f6ff3212b128efd1ff746cabfd5e1f36761fdd7 (diff) | |
download | mongo-9964889f0936441211cf065a15504cdc5973d646.tar.gz |
SERVER-28513 stale_mongos_updates_and_removes.js should only call ensurePrimaryShard once
(cherry picked from commit 465bd234f7931ced4ab2d4ee12e9d0274b5910d6)
-rw-r--r-- | jstests/sharding/stale_mongos_updates_and_removes.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/stale_mongos_updates_and_removes.js b/jstests/sharding/stale_mongos_updates_and_removes.js index 3c345e89113..bacea1f695a 100644 --- a/jstests/sharding/stale_mongos_updates_and_removes.js +++ b/jstests/sharding/stale_mongos_updates_and_removes.js @@ -16,7 +16,6 @@ // (used for testing *multi* removes to a *specific* shard key). var resetCollection = function() { assert(staleMongos.getCollection(collNS).drop()); - st.ensurePrimaryShard(dbName, st.shard0.shardName); assert.commandWorked(staleMongos.adminCommand({shardCollection: collNS, key: {x: 1}})); for (var i = 0; i < numShardKeys; i++) { assert.writeOK(staleMongos.getCollection(collNS).insert({x: i, fieldToUpdate: 0})); @@ -184,6 +183,8 @@ var splitPoint = numShardKeys / 2; assert.commandWorked(st.s.adminCommand({enableSharding: dbName})); assert.commandWorked(st.s.adminCommand({shardCollection: collNS, key: {x: 1}})); +st.ensurePrimaryShard(dbName, st.shard0.shardName); + var freshMongos = st.s0; var staleMongos = st.s1; |