-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
-
(copied to CRM)
The new rename collection is checking if the source collection is sharded without any lock before choosing which path to take. This leaves the following scenario to happen:
0. Create an unsharded collection
1. Run a rename collection which chooses the unsharded rename path
2. A shard collection runs and successfully shards the collection
3. The rename fails because the source collection must not be sharded
We could move the unsharded path to inside the coordinator, so the choice can be taken after serializing with other DDL operations.