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

XMLWordPrintableJSON

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

      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
              Reporter:
              David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: