-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding EMEA
-
Fully Compatible
-
21
A shardCollection command can fail in the following scenario:
1. Config server primary sends _shardsvrShardColection to primary shard
2. The stepdown thread starts running on the config server
3. _shardsvrShardCollection writes to config.chunks and config.collections on the new primary config server
4. _shardsvrShardCollection finishes and returns back to the original config primary before the stepdown thread began killing operations, so the config server will read a stale routing table
In this case, the primary shard wrote the new chunks to config.chunks and marked the collection as sharded in config.collections successfully on the new primary config, so a user can retry and the command should succeed immediately.