[SERVER-36741] ChunkManager::getShardIdsForRange invariants when max = MaxKey Created: 17/Aug/18 Updated: 29/Oct/23 Resolved: 29/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.7 |
| Fix Version/s: | 3.6.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Sharding:BugfixDay, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding 2018-09-10 | ||||
| Participants: | |||||
| Linked BF Score: | 2 | ||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 29/Aug/18 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: The invariant disallows looking up ranges [MaxKey, MaxKey). While such a |