[SERVER-55880] Add a flag for failed candidate plans in SBE explain output Created: 07/Apr/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Anton Korshunov Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: sbe-post-v1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-55094 [SBE] jstests/noPassthrough/plan_cach... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

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.


Generated at Thu Feb 08 05:37:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.