[SERVER-41290] Pipeline stages can incorrectly passthrough mongos when nested within a $lookup sub-pipeline Created: 23/May/19  Updated: 29/Oct/23  Resolved: 27/Jun/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.2.0-rc3, 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Arun Banala
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Query 2019-07-01
Participants:
Linked BF Score: 74

 Description   

There is an interface on LiteParsedDocumentSource to indicate whether a stage is allowed to passthrough from mongos, however the $lookup stage (and $facet) does not call this on its sub-pipeline.



 Comments   
Comment by Githook User [ 27/Jun/19 ]

Author:

{'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}

Message: SERVER-41290 Pipeline stages can incorrectly passthrough mongos when nested within a sub-pipeline

(cherry picked from commit e762e3d6cc29cdab1a04855100c9f2878079a0cf)
Branch: v4.2
https://github.com/mongodb/mongo/commit/220fa6dfa410c38facf33c80879945958d2cc12f

Comment by Githook User [ 27/Jun/19 ]

Author:

{'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}

Message: SERVER-41290 Pipeline stages can incorrectly passthrough mongos when nested within a sub-pipeline

(cherry picked from commit 3642a8fae987f087522a4609289e5764d2c8718c)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/ece6b36c92e8e7702448ee7e581a270ee3ea7305

Comment by Githook User [ 27/Jun/19 ]

Author:

{'name': 'Arun Banala', 'username': 'banarun', 'email': 'arun.banala@mongodb.com'}

Message: SERVER-41290 Pipeline stages can incorrectly passthrough mongos when nested within a sub-pipeline
Branch: master
https://github.com/mongodb/mongo/commit/e762e3d6cc29cdab1a04855100c9f2878079a0cf

Comment by Githook User [ 27/Jun/19 ]

Author:

{'name': 'Arun Banala', 'username': 'banarun', 'email': 'arun.banala@mongodb.com'}

Message: SERVER-41290 Pipeline stages can incorrectly passthrough mongos when nested within a sub-pipeline
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/3642a8fae987f087522a4609289e5764d2c8718c

Comment by Nicholas Zolnierz [ 25/Jun/19 ]

bernard.gorman yep, you did a much better job of describing it! At a minimum, fixing this would make the error message much more clear as to what's going on.

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