diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2020-05-15 13:25:40 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-18 16:14:42 +0000 |
commit | b9b467c27436bcd3fac52f13d16d0b2da8ac190f (patch) | |
tree | 118bed61ab5af0c0f0e8708824b39b99e6fb2771 /jstests | |
parent | 759d48fd0d6bcb94f64ef21cdf0816c13dce5b71 (diff) | |
download | mongo-b9b467c27436bcd3fac52f13d16d0b2da8ac190f.tar.gz |
SERVER-48246 Wait for RSM to detect failover in range_deleter_interacts_correctly_with_refine_shard_key.js
(cherry picked from commit 3443942471729b06c45d1e0069b8aaa6ee670b45)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js b/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js index c805a9b186e..b1abc63cfaa 100644 --- a/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js +++ b/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js @@ -214,6 +214,12 @@ function test(st, description, testBody) { // Clean up the failpoint on the old primary. hangBeforeWritingDecisionFailpoint.off(); + // Wait for relevant nodes to detect the new primary, which may take some time using + // the RSM protocols other than streamable. + awaitRSClientHosts(st.s, newPrimary, {ok: true, ismaster: true}); + awaitRSClientHosts(st.rs1.getPrimary(), newPrimary, {ok: true, ismaster: true}); + awaitRSClientHosts(st.configRS.getPrimary(), newPrimary, {ok: true, ismaster: true}); + // Refine the collection's shard key while the recovery task is hung. jsTestLog("Refining the shard key"); assert.commandWorked(st.s.getCollection(ns).createIndex({x: 1, y: 1, z: 1})); @@ -231,8 +237,6 @@ function test(st, description, testBody) { }); // Verify we can move the chunk back to the original donor once the orphans are gone. - awaitRSClientHosts( - st.rs1.getPrimary(), st.rs0.getPrimary(), {ok: true, ismaster: true}); assert.commandWorked(st.s.adminCommand({ moveChunk: ns, find: {x: 1, y: 1, z: 1}, |