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

Refine collection shard key might try to release the critical section of a migration

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0, 7.1.0-rc1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding EMEA
    • Fully Compatible
    • ALL
    • v7.1
    • Sharding EMEA 2023-09-04
    • 135

      SERVER-76486 added a new implementation of refineCollectionShardKey that resumes migrations in the same phase of the release of the critical section. If there is a stepdown while trying to resume migrations, but the operation succeeds, then the balancer might start sending _shardsvrMoveRange commands to shards while the coordinator is retrying the phase, which causes a race for the critical section, if the migration wins this race, then the refineCollectionShardKey will fail because it will try to release a critical section with a different reason.

      We should set the allowMigrations flag in a different phase than the release of the critical section.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: