[SERVER-38952] Prune redundant index bound Created: 11/Jan/19 Updated: 29/Oct/23 Resolved: 21/Feb/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brigitte Lamarche (Inactive) | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Query 2019-01-28, Query 2019-02-25 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 45 | ||||||||
| Description |
|
We hit this invariant when dealing with wildcard indexes and a query on a multikey field: This will be hit because the list of index bounds for the wildcard index contains a redundant index bound, (a range of values is covered by two bounds). Reproduction:
This produces this failure: INVALID BOUNDS: field #0['$_path']: ["a.0.0", "a.0.0"], ["a.0.0.", "a.0.0/"), ["a.0.0.0", "a.0.0.0"], ["a.0.0.0.", "a.0.0.0/"), field #1['a.0.0.0']: [MinKey, MaxKey]kp = { $_path: 1.0, a.0.0.0: 1.0 }}}{{scanDir = 1 These bounds are wrong because "a.0.0/" in the second bound pair is greater than "a.0.0.0" in the third pair. (Comparison is done by string comparison). Check out attached BF for the full backtrace! There exists code which is supposed to account for the case of redundant index bounds for a multi-key field, and prune the redundant index bound. However, this logic does not capture the case above. To complete this ticket will involve changing this logic to act correctly when seeing the case above.
|
| Comments |
| Comment by Githook User [ 21/Feb/19 ] |
|
Author: {'name': 'Arun Banala', 'username': 'banarun', 'email': 'arun.banala@mongodb.com'}Message: |