Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-103951

Introduce Pipeline::size() and Pipeline::empty()

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2025-05-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We want to increase the encapsulation of the Pipeline class and reduce exposure of its inner constructs.

      Currently, Pipeline::getSources() has around 450 call sites in master. 114 of them is for pipeline->getSources().size(), and 26 is for pipeline->getSources().empty().

      We want to introduce force-inlined Pipeline::size() and Pipeline::empty() to increase code readability, and as a first step to reduce the total number of Pipeline::getSources() calls.

      This minor improvement is related to SPM-4106, but it is out of scope of the project.

            Assignee:
            niels.lohmann@mongodb.com Niels Lohmann
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: