[DOCS-14733] Shard routing for aggregations using $lookup is misleading Created: 12/Aug/21  Updated: 13/Nov/23  Resolved: 19/Jan/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.4.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Improvement Priority: Major - P3
Reporter: Adam Harrison Assignee: Jason Price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 3 weeks ago
Epic Link: DOCSP-11702
Story Points: 2

 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

 



 Comments   
Comment by Githook User [ 20/Jan/22 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14733 shard routing for aggregations (#340)

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v5.2
https://github.com/10gen/docs-mongodb-internal/commit/6d65a62b029eaf5ef30f8e1df01538b6e4b5428c

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14733 shard routing for aggregations (#340) (#352)

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v4.4
https://github.com/10gen/docs-mongodb-internal/commit/61d194e4e63cf644192cae00ef1c10ac3367128f

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14733 shard routing for aggregations (#340) (#351)

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v5.0
https://github.com/10gen/docs-mongodb-internal/commit/d33d4c288568160fd19c6edbaa1af8b404fc81f8

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14733 shard routing for aggregations (#340) (#349)

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v5.1
https://github.com/10gen/docs-mongodb-internal/commit/b426a92d5690343c543626c4548b6f909917cee5

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-14733 shard routing for aggregations (#340)

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: master
https://github.com/10gen/docs-mongodb-internal/commit/6d65a62b029eaf5ef30f8e1df01538b6e4b5428c

Comment by Adam Harrison [ 17/Aug/21 ]

Hi jeffrey.allen ,

Unfortunately I don't think I have the ability to create a pull request. The comparison was something Asya linked when we were discussing this behavior in Slack. Should I reach out to her to create a formalized PR or is something you would be able to do?

-Adam

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