[SERVER-56131] Add early return in SBE runtime planning code if all candidate plans have "exitedEarly=true" Created: 15/Apr/21  Updated: 29/Oct/23  Resolved: 20/May/21

Status: Closed
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: 5.0.0-rc1, 5.1.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: David Storch Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: post-rc0, sbe-post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Query Execution 2021-06-14
Participants:

 Description   

This pertains specifically to this code:

https://github.com/mongodb/mongo/blob/a7a795246a7ba15b36f96337c97333d1cf7f8061/src/mongo/db/query/sbe_runtime_planner.cpp#L162-L177

It is quite possible that all of the candidate plans have exited early. This could happen, for example, if the query involves a sort and all candidate plans require a blocking SORT stage. As written, the loop linked above will execute repeatedly but do nothing. Perhaps the code would be more clear if we returned early when all candidate plans have either failed or exited early?



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 20/May/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-56131 Add early return when all candidate plans have exited early (SBE)
Branch: v5.0
https://github.com/mongodb/mongo/commit/e412e6a8f9346a1ac3785cb43dfc171148fa9bc5

Comment by Githook User [ 19/May/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-56131 Add early return when all candidate plans have exited early (SBE)
Branch: master
https://github.com/mongodb/mongo/commit/9f8a8398bab64e3e31247c9a3e5087c43af5cd35

Generated at Thu Feb 08 05:38:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.