[SERVER-83840] Implicitly change all DBPrimaries on removeShard Created: 04/Dec/23  Updated: 05/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Silvia Surroca Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:

 Description   

Implicitly change all the DBPrimary from the removed shard on a removeShard operation.

To do that we should call the _shardsvrDrainShard command from the _configsvrRemoveShard execution thread.

Considerations to be taken: 

  • We can't call _shardsvrDrainShard unless all the checks to remove a shard pass.
  • Config server will tell the draining shard through the _shardsvrDrainShard command which is the destination shard for all the databases.
  • The balancer won't start moving the unsplittable collections related to the removeShard operation until their database is been moved off the draining shard.

Generated at Thu Feb 08 06:53:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.