Avoid waking up ready waiters twice when updating lastDurable opTime

XMLWordPrintableJSON

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

      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
              Reporter:
              Wenbin Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: