diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2020-09-18 00:29:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-05 20:57:26 +0000 |
commit | e8b7d51f09b189b843b21587057f2a4798585e86 (patch) | |
tree | b37d5d128a85da5545751b2236eb1160df17e5b5 /jstests | |
parent | a7bceadbac919a2c035f2874c61d138fd75d6a6f (diff) | |
download | mongo-e8b7d51f09b189b843b21587057f2a4798585e86.tar.gz |
SERVER-50898 safe_secondary_reads_causal_consistency.js must wait for effects of _configsvrCommitChunkMigration to be majority-committed snapshot on all CSRS members
(cherry picked from commit d466890377b3a36206a98b621486d455873c7e66)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/safe_secondary_reads_causal_consistency.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/sharding/safe_secondary_reads_causal_consistency.js b/jstests/sharding/safe_secondary_reads_causal_consistency.js index 78feecb133e..71fb6912979 100644 --- a/jstests/sharding/safe_secondary_reads_causal_consistency.js +++ b/jstests/sharding/safe_secondary_reads_causal_consistency.js @@ -124,6 +124,11 @@ hangBeforeRefreshFP.wait(); // will be blocked behind the critical section. This insert will be used to test causal consistency // in the later read. jsTest.log("Sending insert through mongos0."); + +// Wait for effects of _configsvrCommitChunkMigration to be majority-committed snapshot on all +// config server members since the mongos may refresh from a node other than the primary. +st.configRS.awaitLastOpCommitted(); + assert.commandWorked(mongos0AlphaDB.adminCommand({flushRouterConfig: 1})); assert.commandWorked(mongos0AlphaDB.runCommand( {insert: collName1, documents: [{_id: 2}], writeConcern: {w: 'majority'}})); |