[SERVER-82228] Refactor run_aggregate with a AggregationPlan class Created: 16/Oct/23  Updated: 03/Feb/24

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

Type: Improvement Priority: Major - P3
Reporter: Will Buerger Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-tech-debt, query-skunkworks
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-82714 Move view resolution and namespace re... Backlog
is depended on by SERVER-82719 Move management of aggregation "conte... Backlog
is depended on by SERVER-82721 Refactor run_aggregate to use a helpe... Backlog
is depended on by SERVER-82722 Refactor run_aggregate to use a helpe... Backlog
Related
is related to SERVER-81826 Investigate views-aggregation perform... Closed
Assigned Teams:
Query Integration
Participants:

 Description   

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.


Generated at Thu Feb 08 06:48:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.