[SERVER-64164] MultipleCollectionAccessor::getSecondaryCollectionVector should return secondary collections that the constructed plan uses Created: 03/Mar/22  Updated: 29/Oct/23  Resolved: 11/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mihai Andrei Assignee: Mihai Andrei
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-03-21
Participants:

 Description   

Currently MultipleCollectionAccessor::getSecondaryCollectionVector returns a vector of all foreign namespaces involved in the pipeline that we are attempting to push down. However, it is not guaranteed that all foreign namespaces will be used in the plan that we are constructing (i.e. the case where a subset of all $lookups are pushed down). Given that we drop locks and reacquire them in DocumentSourceCursor, it is important that we only lock the collections that are involved in the plan. As such, MultipleCollectionAccessor::getSecondaryCollectionVector should be updated to return the secondary collections that the plan uses.



 Comments   
Comment by Githook User [ 11/Mar/22 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@10gen.com', 'username': 'mtandrei'}

Message: SERVER-64164 Track secondary namespaces used by query plan in PlanExecutorSBE
Branch: master
https://github.com/mongodb/mongo/commit/5cb71ebbfc5db3f1457fdb2512e74c753870af6f

Generated at Thu Feb 08 05:59:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.