[SERVER-25584] $facet and $bucket stages do not ensure they are run on the merging shard Created: 12/Aug/16  Updated: 02/Sep/16  Resolved: 16/Aug/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.3.12

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2016-08-29
Participants:

 Description   

As an oversight in the initial implementation, DocumentSourceFacet does not inherit from SplittableDocumentSource, failing to signal that it is special and needs to be run on the merging shard. The same problem affects $bucketAuto.

This was failed to be caught because the integration test which runs $facets against a sharded cluster only does so when the collection is not sharded: https://github.com/mongodb/mongo/blob/r3.3.10/jstests/aggregation/sources/facet/use_cases.js#L102



 Comments   
Comment by Githook User [ 16/Aug/16 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-25584 Ensure $facet and $bucketAuto run on merging shard.
Branch: master
https://github.com/mongodb/mongo/commit/7f87288de1dd99adbecb1d0ece1c29871e72410f

Comment by Charlie Swanson [ 12/Aug/16 ]

Code review url: https://mongodbcr.appspot.com/89450001/

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