[SERVER-29806] make better removeShard user exprience Created: 23/Jun/17  Updated: 25/May/23  Resolved: 25/May/23

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

Type: Improvement Priority: Major - P3
Reporter: Zhang Youdong Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Participants:

 Description   

removeShard now take following steps:

1. decide the shard to be removed, issue sh.removeShard(shardName)
2. wait all sharded chunks to be migrated to other shards
3. when chunks migration finished, do movePrimary manually to migrate the unsharded data
4. wait all the unsharded data to be migrated

The core problem is that the user need to movePrimary manually to finish the removeShard process, maybe we can tell the MongoDB server where to movePrimary when run removeShard command, for example.

sh.removeShard(shard0, [shard1, shard3])

This is to say, I want to remove shard0, and the server can automatically remove the unsharded colletions' primary to [shard1, shard3] for me.

So when removeShard, the user just need to issue a removeShard command, and then have a cup coffee, waiting the removeShard finish.



 Comments   
Comment by Kaloian Manassiev [ 06/Nov/21 ]

The only way to achieve this is to throw out the concept of movePrimary. Moving this to the relevant project Epic.

Generated at Thu Feb 08 04:21:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.