Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76779

moveChunk should wait until in-progress index builds are finished on recipient shard

    • Fully Compatible
    • ALL
    • v7.0
    • Sharding EMEA 2023-05-15, Sharding EMEA 2023-05-29, Sharding EMEA 2023-06-12, Sharding EMEA 2023-06-26
    • 14

      When there is a moveChunk from one shard to another, in the migration_destination_manager.cpp (cloning indexes phase), the recipient shard is not waiting for in-progress index builds to be finished.

      More in particular, the logic of filtering the existing indexes on the destination shard, is using removeExistingIndexesNoChecks that filters out read and in-progress indexes.

      If the recipient shard assumes that in-progress indexes are already created indexes, we could potentially end up in a situation where the index is not finally created in that shard. There is no guarantee that in-progress index build to succeed.

      The goal of this ticket is to fix that behaviour. In order to make that, we could make moveChunk wait for in-progress index build to be finished on the recipient shard.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: