[SERVER-56017] Fix invariant failure in SlotBasedStageBuilder::buildSort() Created: 11/Apr/21 Updated: 29/Oct/23 Resolved: 26/Apr/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Query Execution |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Drew Paroski | Assignee: | Nikita Lapkov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | Open the mongo shell and run the following commands: > db.coll.createIndex({y: 1, x: 1}) |
| Sprint: | Query Execution 2021-04-19, Query Execution 2021-05-03 |
| Participants: |
| Description |
|
Around line 829 of "src/mongo/db/query/sbe_stage_builder.cpp", there is an invariant at the top of the buildSort() method. Here is a valid plan that can cause this invariant() to fail: > db.coll.createIndex({y: 1, x: 1}) The "limit(2)" in the query above forces the QueryPlanner to generate a PROJECTION_COVERED / SORT / IXSCAN plan, where the input to sort stage is coming directly from the index keys. |
| Comments |
| Comment by Githook User [ 26/Apr/21 ] |
|
Author: {'name': 'Nikita Lapkov', 'email': 'nikita.lapkov@mongodb.com', 'username': 'laplab'}Message: |
| Comment by David Storch [ 12/Apr/21 ] |
|
We should remove the sbe_incompatible tag from jstests/aggregation/optimize_away_pipeline.js as part of this ticket. |