[SERVER-83959] When preparing SBE plan, correctly pass preparingFromCache argument Created: 07/Dec/23  Updated: 18/Jan/24  Resolved: 08/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.1, 7.3.0-rc0, 7.0.6

Type: Improvement Priority: Major - P3
Reporter: Ivan Fefer Assignee: Ivan Fefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-80351 Call to stage_builder::prepareSlotBas... Closed
Related
is related to SERVER-66389 segfault due to null JsFunction point... Closed
is related to SERVER-83492 Remove limit and skip values from SBE... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.2, v7.0
Sprint: QE 2023-12-11
Participants:

 Description   

prepareSlotBasedExecutableTree function has preparingFromCache argument, which should mean if the plan is from plan cache or not.

However, if there is only one solution to the query, we unconditionally pass true to it, even if the plan is not actually cached: https://github.com/mongodb/mongo/blob/7eb9602a2f25422d3e075c01140aa4c6b9141fbd/src/mongo/db/query/get_executor.cpp#L1569C1-L1569C1

 



 Comments   
Comment by Githook User [ 29/Dec/23 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-83959 Correctly pass preparingFromCache argument

GitOrigin-RevId: 5cae2f2b7c55f47512258db4ab8c3b6afdd504e1
Branch: v7.2
https://github.com/mongodb/mongo/commit/9ceb1e17d43b479e57621e15883fd3e7d4f68412

Comment by Githook User [ 27/Dec/23 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-83959 Correctly pass preparingFromCache argument

GitOrigin-RevId: 8965442f0c18c70aca29371acf22b7aba97bcd17
Branch: v7.0
https://github.com/mongodb/mongo/commit/3997de5422d92caf03698443ba39adf9493a46b7

Comment by Githook User [ 08/Dec/23 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-83959 Correctly pass preparingFromCache argument

GitOrigin-RevId: 5cae2f2b7c55f47512258db4ab8c3b6afdd504e1
Branch: master
https://github.com/mongodb/mongo/commit/85066eb597829f8c9539b92f44cfe28e645a79e8

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