-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
ALL
-
-
0
In a sharded collection, if all chunks on the primary shard has been migrated to non-primary shards, collection drop command on mongos will not send "drop" command to the empty primary shard, but set its shard version to unsharded/dropped state 0|0||0000... However, an empty shard has the shard version 0|0||epoch and thinks the new shard version is compatible with its current one, so the empty shard doesn't drop its metadata.
In this situation, another insert and query to the just dropped (now unsharded) collection will go to the primary that has stale metadata. The inserted doc will be skipped because the shard doesn't think this doc belongs to it (it thinks it's empty) based on its stale metadata.
- duplicates
-
SERVER-11256 improve handling of empty vs nonexistent CollectionMetadata
- Closed