[SERVER-25005] Execute queries in $lookup and $graphLookup with an explicit Pipeline instead of DBDirectClient Created: 11/Jul/16  Updated: 04/Dec/18  Resolved: 04/Aug/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Querying
Affects Version/s: None
Fix Version/s: 3.3.11

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Max Hirschhorn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-25139 Make $lookup and $graphLookup respect... Closed
is depended on by SERVER-24769 Support $lookup and $graphLookup with... Closed
Related
related to SERVER-26789 Logging for $lookup less complete in ... Backlog
related to SERVER-22541 Aggregation plan executors should be ... Closed
related to SERVER-25585 ClientCursor timeout logic can cause ... Closed
is related to SERVER-23349 Make aggregation expressions/accumula... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 18 (08/05/16)
Participants:
Case:

 Description   

Having $lookup and $graphLookup stages execute as a Pipeline within a Pipeline will make the execution plan for the aggregation pipeline more explicit. The parsed Pipeline instances will use a copy of the same CollatorInterface so that the $lookup and $graphLookup stages compare string values according to the collation of the collection the "aggregate" command was run on.

Work on this ticket will also change how PlanExecutor instances for aggregation queries are registered, in particular the PlanExecutor underlying DocumentSourceCursor. Currently the DocumentSourceCursor and the PipelineProxyStage classes both reference the underlying PlanExecutor in order to faciliate invalidation notifications for catalog operations such as collection and index drops. We can change the PlanExecutor underlying the DocumentSourceCursor to be registered on the CursorManager of the collection the cursor is on. This will simplify the membrane between the query and aggregation subsystems and will also address the segmentation fault reported in SERVER-24386.



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

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-25005 Use Pipeline to execute $lookup and $graphLookup.

Replaces the usages of DBDirectClient::query() in DocumentSourceLookUp
and DocumentSourceGraphLookUp to instead parse and execute a Pipeline.

Simplifies the registration process of the "inner" plan execution in an
aggregation pipeline. The DocumentSourceCursor class now owns its
PlanExecutor and the PipelineProxyStage class no longer has a
std::weak_ptr to it. The "inner" plan executor is registered with the
CursorManager of the underlying Collection and will receive invalidation
notifications if a catalog operation occurs.
Branch: master
https://github.com/mongodb/mongo/commit/5149b0f8a55085808cc6e34dcba491f2278ec3cf

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