-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
21
The findOne() in mongos_get_shard_version.js should be replaced with st.configRS.awaitLastOpCommitted() so the shard version before the moveChunk reflects the shard version after the both splits are applied and committed to the config servers.
Context:
mongos_get_shard_version.js performs two splitChunks, moveChunk and checks the version of the mongos at the end to make sure that mongos has the version right before the moveChunk.
- The splitChunk commands in the test are sent directly to the shards.
- Mongos does a force refresh at the beginning of moveChunk
SERVER-47260added a findOne command against the config server to make the mongos advance its the config opTime and use that opTime as the afterOpTime when refreshing from the config server.- However, the config opTime used as the afterOptime when refreshing from the config server can lag behind the lastAppliedOptime and cause the final shard version to be 2 instead of 3.
- related to
-
SERVER-47260 mongos_get_shard_version.js assumes causal consistency but isn't
- Closed
-
SERVER-50898 safe_secondary_reads_causal_consistency.js must wait for effects of _configsvrCommitChunkMigration to be majority-committed snapshot on all CSRS members
- Closed