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

Make ReshardingCoordinator get the list of donors and recipients after setting allowMigrations:false

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2021-01-25, Sharding 2021-02-08
    • Story Points:
      2

      Description

      The ReshardingCoordinator should retrieve the donor shards for the resharding operation only once allowMigrations:false is set and/or there  are some locks acquired to prevent concurrent moveChunks from occurring / succeeding in the meanwhile. 

      In the current code, it is possible that the ReshardingCoordinator could have an incorrect list of donors and recipients. 

      Consider the following scenario:

      • suppose we have a failpoint set to be paused in reshardCollectionCmd at this line here, after we get donor/recipients from the chunkManager, but before we even create the ReshardingCoordinatorService instance, let alone set allowMigrations:false on the original collection.
      • a moveChunk comes in and succeeds
      • we unpause the failpoint, reshardCollection begins and tries to run with donor shards who no longer actually own the data

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              blake.oler Blake Oler
              Reporter:
              haley.connelly Haley Connelly
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: