Refactor cluster aggregate planning to only attempt to split the pipeline once

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • Query Optimization
    • Query 2019-07-01
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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().

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: