Enable pipeline optimization when $meta is used in an exclusion projection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration, Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-83756, we disabled pipeline optimization when $meta is used in an exclusion projection as a short-term fix to a bug within dependency analysis that caused $match stages that rely on computed $meta fields to be incorrectly pushed before exclusionary $project stages that project those computed $meta fields.

      We intended to revert this change by banning $meta from exclusion projections (SERVER-86431), but decided not to make that breaking change. Instead, we should establish a dependency analysis workflow that will recognize when $match depends on a computed $meta field in an exclusionary $project.

      There is a thorough comment here with more context.

              Assignee:
              Unassigned
              Reporter:
              Will Buerger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: