-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.0
-
Component/s: Aggregation Framework
-
None
-
ALL
http://docs.mongodb.org/manual/core/aggregation-pipeline-sharded-collections/
"The second pipeline consists of the remaining pipeline stages and runs on the primary shard. The primary shard merges the cursors from the other shards and runs the second pipeline on these results. The primary shard forwards the final results to the mongos. In previous versions, the second pipeline would run on the mongos."
- This prevents scaling out non-trivial aggregation pipeline queries
- As a specific case, consider that when using $redact, then all of your queries become aggregation queries, so 100% of your reads will have to flow through the primary shard, even if they otherwise would be a targeted query.
- Minor, but related: Note that selection of the primary shard is usually implicit, ie random from the user point of view and cannot be changed afterwards.
- duplicates
-
SERVER-17737 Support distributed merger for aggregation queries
- Open
- is related to
-
SERVER-18925 Merging part of aggregation pipeline should be performed on a random shard to distribute the load
- Closed