Make DocumentSourceUnionWith::doGetNext() 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, QE 2025-08-18, QE 2025-09-01
    • 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).

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

              Created:
              Updated: