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

Avoid waking up ready waiters twice when updating lastDurable opTime

    XMLWordPrintableJSON

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: