Respect expCtx override in DocumentSourceUnionWith copy constructor

XMLWordPrintableJSON

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

      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
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: