Check if DocumentSourceUnionWith::doGetNext() is exception-safe

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • QE 2025-07-07, QE 2025-07-21, QE 2025-08-04
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      DocumentSourceUnionWith::doGetNext() contains the following line of code:

      _pipeline = pExpCtx->getMongoProcessInterface()->preparePipelineForExecution(
                      _pipeline.release());
      

      However, if preparePipelieForExecution() throws, the release pipeline object might not be destroyed accordingly (memory leak). We should check if this is the case and fix it.

              Assignee:
              Unassigned
              Reporter:
              Romans Kasperovics
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: