[SERVER-35921] Index scan uses incorrect bounds for MinKey and MaxKey Created: 29/Jun/18 Updated: 29/Oct/23 Resolved: 05/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1, 4.2.9, 4.0.21 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Minji Kim | Assignee: | Mikhail Ivkov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | open_todo_in_code, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.2, v4.0
|
||||||||||||||||
| Sprint: | Query 2019-08-12 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 49 | ||||||||||||||||
| Description |
|
The document {a: MinKey} should not match the query {a: { $gt: MinKey }}. However when there is an index present, MinKey is considered in the bounds for the index scan.
|
| Comments |
| Comment by Githook User [ 14/Aug/20 ] | ||||||||||||
|
Author: {'name': 'Misha Ivkov', 'email': 'misha.ivkov@10gen.com'}Message: (cherry picked from commit b1285a2acb60cbf7c268cb5499fbf5d674d490b2) | ||||||||||||
| Comment by Githook User [ 15/Jul/20 ] | ||||||||||||
|
Author: {'name': 'Misha Ivkov', 'email': 'misha.ivkov@10gen.com'}Message: (cherry picked from commit b1285a2acb60cbf7c268cb5499fbf5d674d490b2) | ||||||||||||
| Comment by Githook User [ 22/Nov/19 ] | ||||||||||||
|
Author: {'email': 'david.storch@mongodb.com', 'name': 'David Storch', 'username': 'dstorch'}Message: This tests behavior which was implemented under | ||||||||||||
| Comment by Githook User [ 22/Nov/19 ] | ||||||||||||
|
Author: {'name': 'David Percy', 'username': 'dpercy', 'email': 'david.percy@mongodb.com'}Message: | ||||||||||||
| Comment by Githook User [ 05/Aug/19 ] | ||||||||||||
|
Author: {'name': 'Misha Ivkov', 'email': 'misha.ivkov@10gen.com', 'username': 'mivkov'}Message: | ||||||||||||
| Comment by Charlie Swanson [ 02/Jul/18 ] | ||||||||||||
|
This looks to be a bug in the IndexBoundsBuilder:
There's a similar flaw in the LT/MaxKey case which forgets that MaxKey >= MaxKey. |