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

Look into consolidating calls to CurOp::elapsedTimeExcludingPauses

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc8
    • None
    • None
    • None
    • Query Optimization
    • Fully Compatible
    • QO 2023-05-29, QO 2023-06-26, QO 2023-07-24
    • 161

    Description

      We currently call CurOp::elapsedTimeExcludingPauses twice: (1) first in CurOp::setEndOfOpMetrics, (2) then in CurOp::completeAndLogOperation. We added (1) for query stats since (2) isn't called untilĀ after writeTelemetry. However, the cost of the system tick source (used to calculate the time elapsed) isn't negligible, so it'd be great to see if we can consolidate those two calls into one.

      It'd be easiest to remove (2), but that would change behavior of the opDebug "executionTime" metric since it'd always be calculated slightly earlier in the completion of an operation. I'm not sure how we'd remove (1) without fundamentally changing query stats infrastructure.

      Attachments

        Activity

          People

            maddie.zechar@mongodb.com Maddie Zechar
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: