[SERVER-70436] Restrict cases where isCoveredNullQuery can apply Created: 11/Oct/22 Updated: 29/Oct/23 Resolved: 04/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1, 6.0.3, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alya Berciu | Assignee: | Alya Berciu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Minor Change | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v6.1, v6.0
|
||||||||
| Steps To Reproduce: | See HELP-38275. There is an additional case where we run into a similar problem: db.coll.insertMany([{_id: 1, "a" : [ 1, 2, 3 ] }, {_id: 2, a: null}]) db.coll.aggregate({$match: {a: {$in: [[2], null, []]}}}, {$project: {_id: 1}}) -> returns {_id: 2} db.coll.createIndex({a: 1}) db.coll.aggregate({$match: {a: {$in: [[2], null, []]}}}, {$project: {_id: 1}}) -> returns {_id: 1} and {_id: 2} |
||||||||
| Sprint: | QO 2022-10-17, QO 2022-10-31, QO 2022-11-14 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
There are additional cases where we cannot use an index to cover a null query when we have multiple clauses in $or or $in. We should make sure to add a FETCH stage above the index scan when the index scan bounds are not exact for the non-null part of the predicate, even if we can cover the null part of the query. |
| Comments |
| Comment by Githook User [ 08/Nov/22 ] |
|
Author: {'name': 'Alya Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}Message: |
| Comment by Githook User [ 08/Nov/22 ] |
|
Author: {'name': 'Alya Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}Message: |
| Comment by Githook User [ 04/Nov/22 ] |
|
Author: {'name': 'Alya Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}Message: |