[SERVER-79061] Block TS queries that use bounded sort from lowering to SBE Created: 18/Jul/23  Updated: 29/Oct/23  Resolved: 04/Oct/23

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

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-79764 Ensure that streaming group over TS k... Closed
Problem/Incident
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Sprint: QI 2023-10-02, QI 2023-10-16
Participants:
Linked BF Score: 5

 Description   

See PM-2096 for bounded sort optimizations. The rewrite is done on plan stages after creating the executor (in buildInnerQueryExecutorGeneric). We need to block the queries that use this optimization from being lowered to SBE. This might be tricky due to where in the stack the optimization is happening.

In SERVER-77965 we block any pipeline that contains $sort and $_internalUnpackBucket from executing in SBE. This is too strict and we need to relax the condition to affect only those pipelines that actually have a chance of using bounded sort optimization.



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

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-79061 Tighten the conditions that block a TS query from lowering to SBE
Branch: master
https://github.com/mongodb/mongo/commit/b0653e2578fecf3b13579eb6c0934159f4732ffc

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