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

Agg pipeline + sharding behavior different in 2 places

    XMLWordPrintableJSON

Details

    Description

      Description

      The docs for "Aggregation Pipeline and Sharded Collections" https://docs.mongodb.com/manual/core/aggregation-pipeline-sharded-collections/ has a behavior section that says

      "For aggregation operations that must run on multiple shards, if the operations do not require running on the database’s primary shard, these operations will route the results to a random shard to merge the results to avoid overloading the primary shard for that database. The $out stage and the $lookup stage require running on the database’s primary shard."  (starting 3.2)

       

      But the docs for mongos https://docs.mongodb.com/manual/core/sharded-cluster-query-router/#routing-and-results-process say

      "Changed in version 3.6: For aggregation operations that run on multiple shards, if the operations do not require running on the database’s primary shard, these operations may route the results back to the mongos where the results are then merged."

      I have confirmed with the query team that the latter behavior is correct and the first doc with the notes on the 3.2 behavior should be overwritten or caveat-ed.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            sheeri.cabral Sheeri Cabral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 19 weeks, 5 days ago