[SERVER-71304] PlanExecutorImpl cached collection scan stage to use later before multiplanning Created: 14/Nov/22  Updated: 29/Oct/23  Resolved: 16/Nov/22

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

Type: Bug 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:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-11-28
Participants:
Linked BF Score: 35

 Description   

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.



 Comments   
Comment by Githook User [ 16/Nov/22 ]

Author:

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

Message: SERVER-71304 Cache possible collscan after multiplanning
Branch: master
https://github.com/mongodb/mongo/commit/397f5973dce8b4ea065e829eae7d14054187f6bf

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