Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-64164

MultipleCollectionAccessor::getSecondaryCollectionVector should return secondary collections that the constructed plan uses

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • 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.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: