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

Avoid creating a metadata merging pipeline for search queries which do not reference $$SEARCH_META

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Integration
    • Fully Compatible
    • QO 2023-03-06

      Mongos currently unconditionally builds a metadata merging pipeline with a $setVariableFromSubPipeline stage, even if the tail of the pipeline has no reference to the search metadata ($$SEARCH_META). We can avoid this extra step by analyzing the dependencies of the pipeline suffix and do not build the extra stage if there's no reference to $$SEARCH_META.

            Assignee:
            alyssa.clark@mongodb.com Alyssa Clark
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: