-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.3.9
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v4.4
-
Sharding 2020-03-23
-
26
removeShard does a series of checks before marking a shard as "draining" (aka to be removed) on the config server, including:
- only one shard should be "draining" at a time
- can't remove the last shard
- the shard to be removed should not already be "draining"
However, these checks are not guarded by a distributed lock (or even an in-process lock for a single mongos), and so two removeShard requests to either two different mongoses or the same mongos can pass all checks concurrently and remove two shards at once.
This can be fixed by the new locking mechanism being added for the zone sharding project.
- related to
-
SERVER-32553 The `removeShard` command is not idempotent for the purposes of the sharding continuous config stepdown suite
- Backlog