Refactor getSubPipelines() to return a shared pointer value instead of a reference

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-120626 added a mutable getter to `getSubPipelines` via `getMutableSubPipelines`. However, this can potentially return a reference to a statically allocated object `kNoSubPipeline`.

      A more idiomatic approach would be instead return either a shared pointer or a `boost::intrusive_ptr` from `getSubPipelines` and `getMutableSubPipelines` (const vs non-const, respectively), or nullptr if there are no subpipelines.

      This would require also changing LiteParsedDocumentSourceNestedPipelines to track its `_pipelines` member as a pointer value, as well as all callsites to handle the potentially null value.

            Assignee:
            Unassigned
            Reporter:
            Finley Lau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: