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

Add a flag for failed candidate plans in SBE explain output

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query Execution
    • Labels:
    • Query Execution

      In the classic engine PlanStage common stats has a 'failed' field to indicate that an exception was thrown during the getNext() call. This exception would bubble up to the top of the execution tree causing the 'failed' flag to be set in every PlanStage above the one which has raised the exception. Having this flag set on the root stage is used as an indicator that the entire plan has failed. We then use this flag in the PlanExplainer to populate the execStats part of explain output.

      However, this mechanism doesn't exist in SBE and we can only catch an exception in the upstream code in RuntimePlanner and store an error Status object within a CandidatePlan, but only for a specific, recoverable, type of failure. Since we do not store information about a failed candidate plan within the PlanStats object, we cannot output the 'failed' flag in explain output

      We need to investigate if reporting this flag is feasible for SBE plans, and what would be involved to implement this functionality.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: