summaryrefslogtreecommitdiff
path: root/jstests/sharding
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2020-05-02 11:49:17 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-02 16:28:45 +0000
commit3a3c40e7377e72775e81f05288fc7f3a82ef5d76 (patch)
treeb233c7558bbcb1de595e47f0aea6a11ac73d373b /jstests/sharding
parent1f524764e4e6481d814272d3e25e28a18d587990 (diff)
downloadmongo-3a3c40e7377e72775e81f05288fc7f3a82ef5d76.tar.gz
SERVER-43523 Remove awaitLastOpCommitted() from coll_epoch_test1.js.
Database versioning guarantees that a stale mongos will refresh and discover the new primary shard upon routing operations to the old primary shard.
Diffstat (limited to 'jstests/sharding')
-rw-r--r--jstests/sharding/coll_epoch_test1.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/jstests/sharding/coll_epoch_test1.js b/jstests/sharding/coll_epoch_test1.js
index 88d7c4fc3da..4249265797e 100644
--- a/jstests/sharding/coll_epoch_test1.js
+++ b/jstests/sharding/coll_epoch_test1.js
@@ -24,11 +24,8 @@ var shards = [st.shard0, st.shard1, st.shard2];
jsTest.log("Enabling sharding for the first time...");
assert.commandWorked(admin.runCommand({enableSharding: coll.getDB() + ""}));
-// TODO(PM-85): Make sure we *always* move the primary after collection lifecyle project is
-// complete
st.ensurePrimaryShard(coll.getDB().getName(), st.shard1.shardName);
assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {_id: 1}}));
-st.configRS.awaitLastOpCommitted(); // TODO: Remove after collection lifecyle project (PM-85)
var bulk = insertMongos.getCollection(coll + "").initializeUnorderedBulkOp();
for (var i = 0; i < 100; i++) {
@@ -50,7 +47,6 @@ jsTest.log("Re-enabling sharding with a different key...");
st.ensurePrimaryShard(coll.getDB().getName(), st.shard1.shardName);
assert.commandWorked(coll.ensureIndex({notId: 1}));
assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {notId: 1}}));
-st.configRS.awaitLastOpCommitted();
bulk = insertMongos.getCollection(coll + "").initializeUnorderedBulkOp();
for (var i = 0; i < 100; i++) {