[SERVER-67264] Avoid COLUMN_SCAN if dependencies prefix each other as in "a" and "a.b" Created: 14/Jun/22 Updated: 29/Oct/23 Resolved: 16/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| 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: | QE 2022-07-25, QE 2022-08-08, QE 2022-08-22 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||||||||||
| Description |
|
There's currently a dassert that fails if this scenario arises. I think that parent/child dependencies (or more generally 'ancestral' dependencies like "a" and "a.b.c") should probably disqualify a COLUMN_SCAN since we will need to go to the row store probably to re-assemble the parent. This may not be the case in all cases, but should be a fairly good heuristic for the time being. For example I could imagine querying for {a.nested: {$exists: false}} and somehow knowing that means that in all matching results a will be a scalar value. I think fixing it to work in this case would not be too bad, but it's probably not something that would be beneficial most of the time. |
| Comments |
| Comment by Githook User [ 16/Aug/22 ] |
|
Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: |
| Comment by Charlie Swanson [ 16/Jun/22 ] |
|
Going to mark this as "depends on" |