[SERVER-53330] Make ReshardingCoordinator get the list of donors and recipients after setting allowMigrations:false Created: 10/Dec/20  Updated: 29/Oct/23  Resolved: 25/Jan/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Haley Connelly Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-lifecycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-54023 Complete TODO listed in SERVER-53330 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-01-25, Sharding 2021-02-08
Participants:
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

 



 Comments   
Comment by Githook User [ 22/Jan/21 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-53330 In a resharding operation, retrieve list of participant shards after emplacing the coordinator document
Branch: master
https://github.com/mongodb/mongo/commit/ea7b9357fc3631000eff64b92634d1b7a6068305

Generated at Thu Feb 08 05:30:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.