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

generate wtimeout deadlines with the precise clock

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.21, 3.6.13
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Service Arch 2019-03-25, Service Arch 2019-04-08, Service Arch 2019-04-22
    • 8

      In ReplicationCoordinatorImpl::_awaitReplication_inlock, we generate our deadline for waiting on wtimeout with the fast clock. Because we generate the deadline with the fast clock, but actually wait on it with the precise clock, it is possible for us to wtimeout early if there is significant drift between the precise and fast clocks.

      This is unlikely to happen very often in practice, but could happen if the thread responsible for pushing ahead the fast clock get's descheduled for a substantial period of time. In that case, it is possible for the fast clock to drift multiple seconds behind the precise clock, and to immediately timeout in waitForConditionOrInterruptNoAssertUntil.

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: