[SERVER-25864] $facet stage should propagate calls to needsPrimaryShard() Created: 29/Aug/16  Updated: 19/Nov/16  Resolved: 01/Sep/16

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

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-09-19
Participants:

 Description   

The $facet stage needs to override DocumentSource::needsPrimaryShard()|https://github.com/mongodb/mongo/blob/r3.3.11/src/mongo/db/pipeline/document_source.h#L221 to forward calls and see if any sub-stage needs the primary shard.

This can cause $facet stages containing a $lookup to run on a shard that does not have the collection being looked up from (as discovered when running jstests/aggregation/bugs/server19095.js through the passthrough suite from SERVER-25757)



 Comments   
Comment by Githook User [ 01/Sep/16 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'cswanson310@gmail.com'}

Message: SERVER-25864 Propagate calls to needsPrimaryShardMerger through $facet.
Branch: master
https://github.com/mongodb/mongo/commit/d289e240b653e70a7d90be885a3ad6de21b7c6cb

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