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

Remove the extra call to set lastDurable opTime in oplog applier batch finalizer

    • Replication
    • Fully Compatible
    • Repl 2023-10-30, Repl 2023-11-13

      The OplogApplier triggers an async journal flush at the end of applying a batch. It then calls _recordDurable() to set the lastDurable opTime. However the journalFlusher already did that by first getting the lastApplied opTime token and call onDurable() after the flush is done. This makes the _recordDurable() call redundant. Although this redundant call only involves acquiring the replication coordinator mutex because the new opTime to set should always be no greater than the current one, it's still better to remove it to avoid context switches.

      We should investigate if the above claim is correct and try to remove it (with proper refactoring to clean up the code).

            Assignee:
            kishore.devireddy@mongodb.com Kishore Devireddy
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: