PlanExecutorImpl cached collection scan stage to use later before multiplanning

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.3.0-rc0, 6.0.16
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • QE 2022-11-28
    • 35
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Ivan Fefer
              Reporter:
              Ivan Fefer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: