Modify mongos_get_shard_version.js to uphold causal consistency

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • 21
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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-47260 added 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.

              Assignee:
              Cathy Zhang (Inactive)
              Reporter:
              Haley Connelly
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: