Prevent plan shape counters from executing on foreign side of classic $lookup

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.0.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • v9.0
    • QE 2026-08-03
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the current implementation of the plan shape counters, we increment for each query to the foreign collection when a $lookup is executed in classic. Our intention was to only increment them for the local side, this fixes the issue by first checking some data on the canonicalQuery about if we're in a $lookup or a subpipeline

      The counters are incremented for every query to the foreign collection, which has caused minor perf regressions

            Assignee:
            Matt Boros
            Reporter:
            Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: