-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
run_aggregate.cpp provides the high-level runAggregate functionality, which delegates to a handful of helper functions. As we've been slowly splitting the file into more helper functions, the throughline of the main run_aggregate path has become clearer and more intelligible to engineers; however, each helper function has a list of up to 13 parameters.
We recently added a ParsedFindCommand struct that tracks the metadata of a find command. We should add a AggregationPlan class that wraps the aggregate request, BSON cmdObj, lite parsed pipeline, requestedNss, and executionNss. Those are the primary elements of the run aggregate path that are used through each stage of the file, so this structure will (1) more clearly differentiate which variables are central through the entire process of aggregation versus one step along the way and (2) reduce the friction necessary to delegate runAggregate into more helper functions.
- is depended on by
-
SERVER-82714 Move view resolution and namespace resolution to happen in AggregationPlan
- Backlog
-
SERVER-93536 Move ownership of agg request structures to aggregation execution context
- Backlog
-
SERVER-93539 Split AggExState into AggExState and ResolvedViewAggExState
- Backlog
-
SERVER-82719 Move management of aggregation "context" into AggregationPlan
- Closed
-
SERVER-82721 Refactor run_aggregate to use a helper function that prepares the pipeline
- Closed
-
SERVER-82722 Refactor run_aggregate to use a helper function that prepares the executors
- Closed
- is related to
-
SERVER-81826 Investigate views-aggregation performance with query stats
- Closed