[SERVER-50638] Fix invariant failure in SlotBasedStageBuilder::buildOr() Created: 31/Aug/20 Updated: 29/Oct/23 Resolved: 13/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Drew Paroski | Assignee: | Drew Paroski |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||
| Sprint: | Query 2020-09-07, Query 2020-09-21, Query 2020-10-05, Query 2020-10-19, Query 2020-11-02, Query 2020-11-16 | ||||||||||||||||||
| Participants: | |||||||||||||||||||
| Description |
|
When I was testing out using the $or operator in the first parameter to find() (with SBE mode enabled), I found a case where an invariant in SlotBasedStageBuilder::buildOr() fails. The invariant that fails is "invariant(_data.resultSlot);" around line 350 of "src/mongo/db/query/sbe_stage_builder.cpp". The goal of this task is to investigate why the invariant is failing, diagnose the underlying problem, and implement a fix. When this issue is fixed, the "jstests/core/and_or_nested.js" should be updated to verify all of its queries work when there is both an index on field 'a' and an index on field 'b'. |