[SERVER-25596] Rename SplittableDocumentSource to NeedsMergerDocumentSource Created: 12/Aug/16  Updated: 18/May/18  Resolved: 11/May/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Improvement Priority: Trivial - P5
Reporter: David Storch Assignee: Charlie Swanson
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

When planning how to execute an aggregation command on a sharded cluster, the agg system must "split" the pipeline into two pieces:

  • The part that can be executed in parallel on each targeted shard.
  • The part that must be executed on the merging node. This includes stages like $group, which must aggregate the data from all targeted shards.

A stage marks itself as requiring execution on the merging shard by inheriting from SplittableDocumentSource. The name reflects the fact that many of the stages which require the merging shard can also be split into two steps: $group, for example, can be executed by grouping on each of the shards and then merging the groups together on the merging shard. In this sense, the $group has been split across the shards part and the merger part of the pipeline.

In order to better reflect the fact that we use SplittableDocumentSource to mark stages which must happen on the merging shard, even if the stage cannot be split (e.g. $facet), I propose renaming this class to NeedsMergerDocumentSource.

As part of this change, we may also want to update the code/comments to reflect that the return value of NeedsMergerDocumentSource::getMergeSource() should never be null.



 Comments   
Comment by Githook User [ 11/May/18 ]

Author:

{'name': 'KevinCybura', 'email': 'KevinCybura@gmail.com', 'username': 'KevinCybura'}

Message: SERVER-25596 Rename SplittableDocumentSource to NeedsMergerDocumentSource

Closes #1237

Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/e885cbbc9458eb0de8882ba4fe0b5591498efaf1

Comment by Charlie Swanson [ 26/Apr/18 ]

One of the CUNY students I'm working with is working on a pull request, assigning to myself.

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