Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83959

When preparing SBE plan, correctly pass preparingFromCache argument

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.1, 7.3.0-rc0, 7.0.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v7.2, v7.0
    • QE 2023-12-11

      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

       

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: