Fix verifyE2ELookupSearchExplainOutput for sharded $lookup-in-merger case

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0, 8.3.8
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • v8.3
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When a \$lookup sub-pipeline contains \$searchMeta, the optimizer routes the \$lookup to the merger pipeline. It then appears only in splitPipeline.mergerPart, which getAggPlanStages does not search, causing "Expected at least one \$lookup stage" assertion failures in the mongot_e2e_sharded_collections suite.

      Fall back to searching splitPipeline.mergerPart when getAggPlanStages returns empty. Also skip the nReturned check for merger-sourced stages, since mergerPart is always serialized at queryPlanner verbosity and execution stats are not tracked there.

            Assignee:
            Mariano Shaar
            Reporter:
            Mariano Shaar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: