Check where we can delete DocumentSource pipeline once exec::agg::Pipeline is created

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2025-08-18
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      Ideally, once a QE pipeline is created from the given QO (document source) pipeline, we can destroy the QO pipeline. For this purpose, we need to examine all invocations of exec::agg::buildPipeline(pipeline->freeze()) responsible for QE pipeline creation and replace those with exec::agg::buildPipeline(std::move(pipeline)) where the latter is buildPipeline(Pipeline&&) override indicating the move-semantics.

      In case of the 'explain' command, we can extract explain output from the QO pipeline before it is destroyed. We will also need to modify mergeExplains() method to accept QO pipeline's explain output instead of QO pipeline itself.

      If for some other reason it is not possible to destroy a QO pipeline, we may try to convert it into a FrozenPipeline class offering read-only interface to avoid QO pipeline modification after the corresponding QE pipeline was created. On success, we could remove the Pipeline::_frozen flag which was added within this project together with the corresponding assertions in pipeline modification methods.

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

              Created:
              Updated: