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

PosixTimer::onThreadDetach does not properly compute elapsed time across multiple pauses

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Show
      attach_detach_test.diff
    • Execution Team 2022-07-11, Execution Team 2022-07-25

    Description

      https://github.com/10gen/mongo/blob/330458e81f9baa3f936d639dc3edbe1a8c4c5a32/src/mongo/db/operation_cpu_timer.cpp#L146
       
      Not sure how often an operation's client can be detached from the thread, but in case it is detached/reattached more than once, the timer only stores the elapsed time until the last interruption.
       
      Probably a matter of accumulating instead of assigning _elapsedBeforeInterrupted.

      Attachments

        Activity

          People

            yujin.kang@mongodb.com Yujin Kang Park
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: