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

Resharding donor shards cannot complete a shard version refresh after acquiring the critical section, stalling the resharding operation

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Sprint:
      Sharding 2021-06-28
    • Linked BF Score:
      134
    • Story Points:
      1

      Description

      Shards during a resharding operation rely on a shard version refresh to be triggered after a new primary has stepped up for the DonorStateMachine and RecipientStateMachines to learn of a change to the coordinator's state. However, a shard version refresh won't be able to complete while the critical section is held. This means if the write to acquire the critical section becomes majority-committed but the write to transition to DonorStateEnum::kBlockingWrites doesn't, then the donor shard will be stuck unable to advance past DonorStateEnum::kDonatingOplogEntries. The shard version refresh won't be able to complete while the critical section is held and so the donor shard won't realize it is safe for it to complete its transition to DonorStateEnum::kBlockingWrites.

      The DonorStateEnum::kPreparingToBlockWrites state had been removed as part of SERVER-55677 but could be reintroduced to solve this issue. A donor shard coming up in DonorStateEnum::kPreparingToBlockWrites would mean the donor shard doesn't need to wait for a shard version refresh to complete before it can complete its transition to DonorStateEnum::kBlockingWrites.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: