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

$graphLookup does not report variable references for 'restrictSearchWithMatch' filter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 6.0.0-rc13
    • 4.2.23, 4.4.17, 6.0.2, 6.2.0-rc0, 5.0.13
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4, v4.2
    • QO 2022-09-05

    Description

      As part of $lookup sub-pipeline correlation analysis, we try to detect the largest prefix of the pipeline which is non-correlated and temporarily cache the result instead of re-running for each document in the outer pipeline. This optimization relies on each aggregation stage correctly reporting it's variable dependencies, which may include a variable defined in the 'let' of the $lookup.

      However $graphLookup does not fully report its dependencies for the 'restrictSearchWithMatch' option, which means if its contained in a $lookup sub-pipeline then it may be incorrectly treated as non-correlated.

      Attachments

        Issue Links

          Activity

            People

              nicholas.zolnierz@mongodb.com Nicholas Zolnierz
              nicholas.zolnierz@mongodb.com Nicholas Zolnierz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: