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

Respect expCtx override in DocumentSourceUnionWith copy constructor

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-06-10

      A constructor that copies DocumentSourceUnionWith accepts ExpCtx for an override:
      https://github.com/mongodb/mongo/blob/dbf9b1429b1fbe900472195dd7353cfde835dba3/src/mongo/db/pipeline/document_source_union_with.h#L103

      But it doesn't pass it when cloning underlying pipeline:
      https://github.com/mongodb/mongo/blob/dbf9b1429b1fbe900472195dd7353cfde835dba3/src/mongo/db/pipeline/document_source_union_with.h#L105

      This may lead to inconsistent expCtx between pipeline stage and sub-pipeline.

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: