[DOCS-13229] Conflicting info about Aggregation pipelines and sharded collections Created: 15/Nov/19  Updated: 30/Oct/23  Due: 19/Feb/21  Resolved: 02/Mar/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Critical - P2
Reporter: Sheeri Cabral (Inactive) Assignee: Andrew Feierabend (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-7237 Ambiguity about Where the Merge Sort ... Closed
is related to DOCS-11469 Ambiguity about Where the Merge Sort ... Closed
Participants:
Days since reply: 2 years, 49 weeks, 1 day ago
Epic Link: DOCSP-11701
Story Points: 2

 Description   

Description

 
The docs for "Aggregation Pipeline and Sharded Collections" at 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 asked in slack and Asya confirmed that the latter is the appropriate version - with the clarification that "may" is:

If the operations do not require running on the database’s primary shard, and need to be merged on a shard, they are merged on a random shard which may include the primary. 

If the operations do not require running on the database’s primary shard, and DO NOT need to be merged on a shard, they are merged on the mongos.

 

 

Scope of changes

Impact to Other Docs

MVP (Work and Date)

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



 Comments   
Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13229 correct merge behavior sharded cluster
Branch: v3.6
https://github.com/mongodb/docs/commit/1bea077ddc9c25ba065e5c18cd86de7c9b32bdca

Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13229 correct merge behavior sharded cluster
Branch: v4.0
https://github.com/mongodb/docs/commit/ff4b0eb04d789ff95e2d301a36bde55a3e810aec

Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13229 correct merge behavior sharded cluster
Branch: v4.2
https://github.com/mongodb/docs/commit/43065f2af8d4bf34d9aed9b4877c116a3049c5ad

Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13229 correct merge behavior sharded cluster
Branch: master
https://github.com/mongodb/docs/commit/fb8bd8cc913285ee56d0d53efc4061ed16aa121f

Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13229 correct merge behavior sharded cluster
Branch: v5.0
https://github.com/mongodb/docs/commit/b5294b77761cc6726cd0c3b45f21020dd58fad91

Generated at Thu Feb 08 08:07:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.