[SERVER-81918] Remove the extra call to set lastDurable opTime in oplog applier batch finalizer Created: 05/Oct/23  Updated: 25/Jan/24  Resolved: 02/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Kishore Devireddy
Resolution: Fixed Votes: 0
Labels: PM-3489-Milestone-MiscImprovement-CP
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-85600 [Milestone] Misc Improvement Checkpoint In Progress
Related
is related to SERVER-54938 Only flush journal once per batch on ... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-10-30, Repl 2023-11-13
Participants:

 Description   

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).



 Comments   
Comment by Githook User [ 02/Nov/23 ]

Author:

{'name': 'Kishore Devireddy', 'email': 'kishore.devireddy@mongodb.com', 'username': 'kishorekrd'}

Message: SERVER-81918: Remove the extra call to set lastDurable opTime in oplog applier batch finalizer
Branch: master
https://github.com/mongodb/mongo/commit/d95689a297ac45bd5f584ec4bb2c779f919b8a63

Comment by Kishore Devireddy [ 02/Nov/23 ]

fixed

Generated at Thu Feb 08 06:47:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.