Improve ownership semantics for passing Pipeline objects

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-07-07, QE 2025-07-21, QE 2025-08-04, QE 2025-08-18, QE 2025-09-01, QE 2025-10-13
    • 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:
            Jan Steemann
            Reporter:
            Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: