-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
ALL
-
QE 2022-03-21
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.