Implement a cursor stage for SBE. (SERVER-78161)

[SERVER-78162] Define the cursor stage class to unblock other $search works Created: 16/Jun/23  Updated: 29/Oct/23  Resolved: 14/Jul/23

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

Type: Sub-task Priority: Major - P3
Reporter: Zixuan Zhuang Assignee: Prithwish Dan (Inactive)
Resolution: Fixed Votes: 0
Labels: search-in-sbe
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Sprint: QE 2023-08-07, QE 2023-08-21, QE 2023-09-04, QE 2023-09-18, QE 2023-10-02
Participants:

 Description   

No implementation is needed, just define the class

search_cursor_stage optionalIdSlot optionalResultSlot [metaSlot1, …, metadataSlotN] [fieldSlot1, …, fieldSlotN] optionalSearchMetaSlot

optionalIdSlot: for _id

optionalResultSlot: for entire mongot result

[metaSlot1, …, metadataSlotN] : a vector of slot for metadata

 [fieldSlot1, …, fieldSlotN] : a vector of slot for fields from the mongot result, currently only storedSource field is possible

optionalSearchMetaSlot: for $$SEARCH_META



 Comments   
Comment by Githook User [ 12/Jul/23 ]

Author:

{'name': 'Prithwish Dan', 'email': 'prithwish.dan@mongodb.com', 'username': 'pdan-mongodb'}

Message: SERVER-78162 Set up skeleton for search_cursor_stage class
Branch: master
https://github.com/mongodb/mongo/commit/68017a85c15da48fc321915dc7c4d545633832a3

Comment by Zixuan Zhuang [ 10/Jul/23 ]

prithwish.dan@mongodb.com We have reached the agreement on last review meeting, please start to work on it.

Comment by Zixuan Zhuang [ 03/Jul/23 ]

Sure david.storch@mongodb.com, Prithwish will need some time to learn how to implement a SBE stage, we won't start until we get the agreement.

Comment by David Storch [ 03/Jul/23 ]

We may want to hold off on implementing this until we have agreement on the design for the sharded case. In the sharded case the mongot will return two cursors to its partner mongod: one for the search results and one for the search metadata. We need to specify how we will deal with those two cursors on the mongod side. I am assuming that the two cursors will be consumed by two separate SBE plans, since this will eliminate the need for the old $_internalSearchMongotRemote DocumentSource-based implementation. However, the search_cursor_stage doesn't seem appropriate for consuming the metadata cursor. Therefore, it's not yet obvious to me that the search_cursor_stage as proposed is the correct abstraction unless we know how things will look in the sharded case.

cc kyle.suarez@mongodb.com amr.elhelw@mongodb.com zixuan.zhuang@mongodb.com

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