-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
The PlanExecutor and PlanYieldPolicy family trees have become intertwined in a way that puts unwanted constraints on visibility of child classes and makes it hard to add some new functionality without creating cycles in build targets and/or #includes.
The main problem is that there is PlanExecutorXyz concrete (child) class functionality implemented in PlanYieldPolicyXyz concrete (child) classes, especially the saveState() and restoreState() implementations for each executor engine. This requires the PlanYieldPolicyXyz child classes to see the definitions of the PlanExecutorXyz child classes, thus making it impossible for the reverse visibility to be exposed without creating a cycle.
Ideally there should be no need for a PlanYieldPolicy to know anything about a PlanExecutor. To make this the case, there should not be any PlanExecutorXyz-specific functionality implemented in PlanYieldPolicyXyz. Instead, saveState() and restoreState() should be changed from pure virtual methods in PlanYieldPolicy to callbacks in the YieldPolicyCallbacks class and 100% of their implementations should be moved out of the PlanYieldPolicyXyz classes and into the PlanExecutorXyz classes.
There are probably additional opportunities for simplification at the same time, but the above appears to be the main one currently constraining the code in unwanted ways.
SERVER-96442 cannot currently be implemented due to the existing constraints, so it depends on this ticket.
- is depended on by
-
SERVER-96442 Use concrete type PlanYieldPolicySBE throughout SBE
- Needs Scheduling
- related to
-
SERVER-96442 Use concrete type PlanYieldPolicySBE throughout SBE
- Needs Scheduling