Enable pushdown of config.cache.chunks $lookup through $sort

XMLWordPrintableJSON

    • Fully Compatible
    • Query Optimization 2021-02-22, Query Optimization 2021-03-08, Query Optimization 2021-03-22, Query Optimization 2021-04-05, Query Optimization 2021-04-19
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      As part of a resharding operation we issue a pipeline with a $sort followed by a $lookup on config.cache.chunks. For efficiency and resumability, we need each shard to provide things in a sorted order and also perform the $lookup. Today this doesn't work because the $sort forces a split of a sharded pipeline and does not push the $lookup into the shards part. For this particular $lookup, we know it is safe to run it in parallel, so we should be able to push it into the shards pipeline.

            Assignee:
            Yuhong Zhang
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: