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

Mark PlanStage::isEOF()/PlanExecutor::isEOF()/PlanExecutor::getKillStatus() as const

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: Query Execution
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-01-20

      The following methods should be declared const as they do not modify any state of the queried objects:

      • PlanStage::isEOF()
      • PlanExecutor::isEOF()
      • PlanExecutor::getKillStatus()

      This should not change behavior or performance in any way, but strengthens the API contracts of these methods. Callers would not expect these methods to modify the state anyway. By marking them as explicitly const, we can prevent them from unintentionally modifying state in the future.

            Assignee:
            jan.steemann@mongodb.com Jan Steemann
            Reporter:
            jan.steemann@mongodb.com Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: