-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Some stages with sub-pipelines contain redundant code to handle exceptions and recover from them when the sub-pipeline is created on a view.
For example, $unionWith tries to create the initial sub-pipeline, but when this fails with CommandOnShardedViewNotSupportedOnMongod exception, it calls buildPipelineFromViewDefinition(...) and tries again here.
$lookup also does similar things here and here.
$graphLookup also has the same pattern here.
Potentially even more stages follow this pattern. Overall, the view-related exception handling pattern seems to be present in multiple stages and potentially can be unified.
It is possible that the sub-pipeline building in the affected stages is substantially different so that no unification of the view handling is possible.
However, this should be investigated.
- is related to
-
SERVER-106693 Avoid recursion in DocumentSourceUnionWith::doGetNext()
-
- Closed
-