Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14733

Shard routing for aggregations using $lookup is misleading

    XMLWordPrintableJSON

Details

    Description

      The docs page for aggregations on sharded clusters says the following:

       

      > If the pipeline starts with an exact $match on a shard key, the entire pipeline runs on the matching shard only.

      However, aggregations starting with an exact $match on a shard key can still require running on multiple shards if the pipeline contains a $lookup stage, as this requires being run on the primary shard of the cluster.

       

      The statement above should be clarified to note that an exact $match is not sufficient to ensure single shard execution.

       

      A PR to clarify this has already been prepared:

      https://github.com/mongodb/docs/compare/master...asya999:patch-81

       

      Attachments

        Activity

          People

            jason.price@mongodb.com Jason Price
            adam.harrison@mongodb.com Adam Harrison
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 3 weeks ago