Push down DocumentSourceSearch into SBE (SERVER-78163)

[SERVER-78164] Make SBE eligible for DocumentSource with requiresInputDocSource = false Created: 16/Jun/23  Updated: 29/Oct/23  Resolved: 21/Jul/23

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

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

Issue Links:
Backports
Problem/Incident
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: QE 2023-07-10, QE 2023-07-24, QE 2023-08-07
Participants:
Linked BF Score: 0

 Description   

Can’t return an empty executor here due to requiresInputDocSource is false for DocumentSourceSearch, we will not be able to build the SBE plan otherwise.



 Comments   
Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Alyssa Wagenmaker', 'email': 'alyssa.wagenmaker@mongodb.com', 'username': 'awagenmaker'}

Message: SERVER-78164 Expose isSearchPipeline helper function

This is a partial backport of SERVER-78164 to expose the isSearchPipeline helper functions.

Co-authored-by: Kristina Znam <kristina.znam@mongodb.com>
Branch: v7.0
https://github.com/mongodb/mongo/commit/6aaeb29a9f4cd6b56f95cb70ea6d98a8d8c8fa68

Comment by Githook User [ 18/Jul/23 ]

Author:

{'name': 'Kristina Znam', 'email': 'kristina.znam@mongodb.com', 'username': 'kmznam'}

Message: SERVER-78164 Make SBE eligible for DocumentSource with requiresInputDocSource = false
Branch: master
https://github.com/mongodb/mongo/commit/c1ce4637e5fe732b9c68bf39a08a51f289abf512

Comment by Githook User [ 15/Jul/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-78164: Make SBE eligible for DocumentSource with requiresInputDocSource = false"

This reverts commit bf87ce2a38f5a9582e131498acd7016c61df54b0.
Branch: master
https://github.com/mongodb/mongo/commit/5becfa1dbc9084a9322558ade44ed79534d4ca26

Comment by Githook User [ 15/Jul/23 ]

Author:

{'name': 'Kristina Znam', 'email': 'kristina.znam@mongodb.com', 'username': 'kmznam'}

Message: SERVER-78164: Make SBE eligible for DocumentSource with requiresInputDocSource = false
Branch: master
https://github.com/mongodb/mongo/commit/bf87ce2a38f5a9582e131498acd7016c61df54b0

Comment by Zixuan Zhuang [ 04/Jul/23 ]

We should check the following conditions to skip requiresInputDocSource checking:

  1. not forceClassicEngine
  2. featureFlagSearchInSbe
  3. pipeline.front() == $search
Generated at Thu Feb 08 06:37:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.