_configsvrShardCollection majority updates the config.collections collection to mark a collection as sharded then sends setShardVersion to the primary shard for the collection's database so it knows to refresh. If the write is interrupted by a retryable error (like a stepdown), the command can fail, but the update may still have been locally committed and/or partially replicated to the new primary. Then when the command is retried by mongos, the config server can see the write has been locally committed and return early, skipping the setShardVersion call, allowing the command to complete successfully without the primary shard knowing the collection has been sharded.
- is duplicated by
-
SERVER-34708 Possible for shard to not learn about a sharded collection it owns
- Closed