-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Internal Code
-
Labels:None
-
Query Optimization
-
Query 2019-07-01
During development on SERVER-5477 we noticed that Pipeline::requiredToRunOnMongos() emulates much of the logic in cluster_aggregation_planner::splitPipeline(). This caused problems when we wanted to add the shard key as a parameter to distributedPlanLogic(), because keeping track of what the shard key is at every stage in the pipeline is non-trivial due to renamed and modified paths at each stage.
After staring at this problem for a while, george.wangensteen, ted.tuckman and I think the best solution is to do a refactor to push the logic about where the pipeline is required to run down into cluster_aggregation_planner::splitPipeline() and then delete helpers on Pipeline such as requiredToRunOnMongos().