Reduce ScopedSetShardRole scope to setup stage of index build

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v7.0, v6.0, v5.0
    • Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-07
    • 150
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently ScopedSetShardRole which sets the shard version is scoped to affect the whole index build thread. This should not be necessary, and has caused issues in the past (SERVER-69530).

      The shard version protocol is only required when setting up the index build and writing the 'startIndexBuild' oplog entry. If a chunk migration is in-progress while an index build is started, it will be aborted. A recipient shard will copy in-progress indexes from the donor shard, and if the index build is aborted on the donor, the client running createIndexes will receive an error requiring them to retry the command, and the indexes will become consistent.

            Assignee:
            Yujin Kang Park
            Reporter:
            Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: