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

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

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

      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 Unassigned
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: