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
- is duplicated by
-
SERVER-80351 Call to stage_builder::prepareSlotBasedExecutableTree in getSlotBasedExecutor sets 'preparingFromCache' to 'true' incorrectly
- Closed
- is related to
-
SERVER-66389 segfault due to null JsFunction pointer for auto-parameterized $where
- Closed
-
SERVER-83492 Remove limit and skip values from SBE plan cache key if possible
- Closed