[SERVER-83725] Cleanup setMyLast(Durable|Applied)OpTimeAndWallTime in ReplicationCoordinator Created: 29/Nov/23  Updated: 25/Jan/24  Resolved: 12/Dec/23

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

Type: Task Priority: Major - P3
Reporter: Jiawei Yang Assignee: Jiawei Yang
Resolution: Fixed Votes: 0
Labels: PM-3489-Milestone-LastWrittenOpTime-CP
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-85599 [Milestone] LastWritten OpTime Checkp... In Progress
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-12-11, Repl 2023-12-25
Participants:

 Description   

Currently, for updating lastDurable and lastApplied timestamp in ReplicationCoordinator, we have four functions:

  • setMyLastAppliedOpTimeAndWallTimeForward -> Used by OplogApplier
  • setMyLastDurableOpTimeAndWallTimeForward -> Used by ReplicationCoordinatorExternalState::onDurable
  • setMyLastAppliedOpTimeAndWallTime -> Not used at all
  • setMyLastDurableOpTimeAndWallTime -> We can use setMyLastDurableOpTimeAndWallTimeForward instead if this comment is true.

We can cleanup the interfaces to only keep one function for updating lastApplied and lastDurable respectively.
 



 Comments   
Comment by Githook User [ 12/Dec/23 ]

Author:

{'name': 'Jiawei Yang', 'email': 'jiawei.yang@mongodb.com', 'username': 'YoungYang0820'}

Message: SERVER-83725 Cleanup setMyLastApplied/Durable in replication coordinator

GitOrigin-RevId: 3247854d1a767f72a97f21293008f984254d3b0d
Branch: master
https://github.com/mongodb/mongo/commit/09b1066cbfc3c2566be07d433af055bd336a4a0c

Comment by Wenbin Zhu [ 01/Dec/23 ]

We can use setMyLastDurableOpTimeAndWallTimeForward instead if this comment is true.

I think this comment is true due to this invariant.

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