-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.4.5
-
Component/s: Sharding
-
None
-
Sharding EMEA
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
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.