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

Avoid waking up ready waiters twice when updating lastDurable opTime

    • Replication
    • Repl 2024-02-05, Repl 2024-02-19, Repl 2024-03-04

      Whenever we update the lastDurable timestamp, we do two things:

      1) Update `lastCommitted` and `commit point` if WriteConcernMajorityShouldJournal == true, which would eventually call `_wakeReadyWaiters()` if the committed point is advanced.

      2) Right after the above step, call `_wakeReadyWaiters` again.

      This seems to be duplicate work as they are called under the same mutex, we could consider skip calling `_wakeReadyWaiters` in step 1) and only walk through all the waiters in step 2).

      Note this is based on code inspection, we should double check this before doing the changes.

            Assignee:
            brad.cater@mongodb.com Brad Cater
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: