[SERVER-69102] [CQF] Allow SBE plans (built through CQF) which require a output RecordId slot Created: 23/Aug/22  Updated: 29/Oct/23  Resolved: 11/Sep/22

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

Type: Bug Priority: Major - P3
Reporter: Ben Shteinfeld Assignee: Svilen Mihaylov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2022-09-05, QO 2022-09-19
Participants:

 Description   

findOne() is an internal C++ helper function which constructs a PlanExecutor and invokes getNext() with the RecordId out-param. Note that the find implementation never sets this parameter.

When a CQF-eligible query uses the findOne() helper, such as in the codepath to drop a view, the SBE plan executor hits an invariant during the getNext() call that the output recordId slot is not set.

SERVER-62407 introduced a temporary bit to CanonicalQuery to avoid using CQF in the findOne codepath. This ticket tracks the work to allow SBE plans generated via CQF to output the RecordId slot, allowing the findOne() codepath to use CQF.



 Comments   
Comment by Githook User [ 04/Oct/22 ]

Author:

{'name': 'Zixuan Zhuang', 'email': 'zixuan.zhuang@mongodb.com', 'username': 'leozzx'}

Message: Merge remote-tracking branch 'origin/master' into zixuan.zhuang/SERVER-69102_ixscan
Branch: zixuan.zhuang/PERF-3365_ixscan
https://github.com/mongodb/mongo-perf/commit/e00dbf4718fb7eb67a18b61cf15e23baa97508d9

Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Zixuan Zhuang', 'email': 'zixuan.zhuang@mongodb.com', 'username': 'leozzx'}

Message: Merge remote-tracking branch 'origin/master' into zixuan.zhuang/SERVER-69102_ixscan
Branch: zixuan.zhuang/SERVER-69102_ixscan
https://github.com/mongodb/mongo-perf/commit/e00dbf4718fb7eb67a18b61cf15e23baa97508d9

Comment by Githook User [ 10/Sep/22 ]

Author:

{'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'smihaylov-mongodb'}

Message: SERVER-69102 [CQF] Allow SBE plans which require an output RecordId slot
Branch: master
https://github.com/mongodb/mongo/commit/8d09cb4f4704fe9492eca8654a9016e3ebc1d1bd

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