-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2019-04-22
-
32
Before running the multiShardAllReads test case, snapshot_cursor_commands_mongos.js shards a collection, splits it at 4 and 8, moves the chunk containing 0 to shard0, 4 to shard1, and 7 to shard2, and asserts each shard owns one chunk by checking the config.chunks collection. The same chunk contains 4 and 7 though, so no chunk is guaranteed to end on shard1, but the test rarely fails because shard1 is almost always chosen as the primary shard, so the 3rd chunk that isn't moved will remain on it.
Instead of relying on which shard is the primary without explicitly enforcing it, the test should be updated to move a different chunk to each shard instead of moving the same one twice.