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

Consider moving ExpressionContext::_interruptCounter to somewhere else

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: Query Execution
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-03-31, QE 2025-04-14
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We've introduced ExpressionContext::checkForInterrupt() to throttle the actual checks for interrupt on every DocumentSource::getNext(), because they are expensive.

      The ExpressionContext::checkForInterrupt() uses ExpressionContext::_interruptCounter as a throttling frequency counter that is shared by all stages of the pipeline.

      In the context of separating query execution and query optimization (e.g., SPM-4106) we might reconsider this design and count the frequency either per stage or introduce another class, for instance, StageInterruptThrottler, shared by all pipeline stages to refactor this functionality from already-overloaded ExpressionContext.

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

              Created:
              Updated:
              Resolved: