-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.6.7
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2018-09-10
-
2
The ChunkManager::getShardIdsForRange call contains an invariant to ensure that the range it is passed is contained within the shard key space for the collection.
However, this invariant is incorrect when the range ends in MaxKey, because MaxKey is not a valid key value. The invariant should be extended to account for MaxKey and as part of fixing this we should write unit-tests to validate this logic.
This bug does not exist in versions 4.0 and later, because we use a different structure for the chunk ranges.