PlanExecutorImpl caches collection scan before multiplanning:
https://github.com/mongodb/mongo/blob/7981ec64d28c49dd2f41d466f7b6bfaccad66fa9/src/mongo/db/query/plan_executor_impl.cpp#L142
And uses it to get some execution-dependent values here:
https://github.com/mongodb/mongo/blob/7981ec64d28c49dd2f41d466f7b6bfaccad66fa9/src/mongo/db/query/plan_executor_impl.cpp#L661
This is wrong, because if multiplanner rejects collscan, values there will be obsolete.
- is related to
-
SERVER-88817 Investigate invariant in async_results_merger.cpp
- Closed