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

Add early return in SBE runtime planning code if all candidate plans have "exitedEarly=true"

    • Fully Compatible
    • v5.0
    • Query Execution 2021-06-14

      This pertains specifically to this code:

      https://github.com/mongodb/mongo/blob/a7a795246a7ba15b36f96337c97333d1cf7f8061/src/mongo/db/query/sbe_runtime_planner.cpp#L162-L177

      It is quite possible that all of the candidate plans have exited early. This could happen, for example, if the query involves a sort and all candidate plans require a blocking SORT stage. As written, the loop linked above will execute repeatedly but do nothing. Perhaps the code would be more clear if we returned early when all candidate plans have either failed or exited early?

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: