[SERVER-67610] Use RuntimeEnvironment for index key corruption checks Created: 28/Jun/22  Updated: 06/Dec/22  Resolved: 07/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Eric Cox (Inactive) Assignee: Backlog - Query Execution
Resolution: Won't Do Votes: 0
Labels: pm2697-m4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-66437 Improve performance of IDhack plans i... Open
is depended on by SERVER-66437 Improve performance of IDhack plans i... Open
Assigned Teams:
Query Execution
Sprint: QE 2022-09-19
Participants:
Story Points: 5

 Description   

In SERVER-66437 the IndexScanStage was changed to allow lowKey and highKey slots to be inlined into the IndexScanStage as EExpressions. This essentially is an optimization for single interval index scan plans and enables us to eliminate the need for an nlj stage to feed in the lowKey/highKey slots. 

The resulting plan is the following,

nlj [s4, s6] []
            left
                [1] project [s4 = "_id_", s6 = {"_id" : 1}]
                [1] limit 1
                [1] coscan
            right
                [1] project [s3 = s8]
                [1] ixseek KS(3C73686172644964656E74697479000104) KS(3C73686172644964656E7469747900FE04) s5 s7 s8 [] @"0f95d593-30f7-4386-9cb9-b5ce575e86cb" @"_id_" true

There is no longer a need for slots s4 and s6 to be fed into the right branch of the nlj stage for the index key corruption check. The owner of this ticket should evaluate if we can use the runtime environment for s4 and s6 and eliminate the need for this whole nlj stage.



 Comments   
Comment by Kyle Suarez [ 21/Sep/22 ]

Bumping this to M4 as it has been largely subsumed by the larger IDHACK effort.

Comment by Nikita Lapkov (Inactive) [ 08/Sep/22 ]

Sorry for the ping-pong, assigning this back to Mihai per our discussion on ABT meeting.

Comment by Kyle Suarez [ 02/Sep/22 ]

Assigning to the venerable nikita.lapkov@mongodb.com to drive this task for this sprint while Mihai is on vacation.

Generated at Thu Feb 08 06:08:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.