[SERVER-85488] Make setMyLastDurable a noop if lastWritten is null Created: 19/Jan/24  Updated: 23/Jan/24  Resolved: 23/Jan/24

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

Type: Bug Priority: Major - P3
Reporter: Jiawei Yang Assignee: Jiawei Yang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2024-02-05
Participants:
Linked BF Score: 135

 Description   

When initial sync starts, we will reset lastDurable, lastApplied and lastWritten to null optime. Before SERVER-47898, if the journal flusher tries updating lastDurable, it will end up in a noop because lastDurable cannot advance beyond lastApplied.

After SERVER-47898, lastDurable can be advanced beyond lastApplied, which in a race condition that the journal flusher takes a token before initial sync resets optime and uses that token to update lastDurable after initial sync resets optime, will trigger the invariant in SERVER-83573 that the new lastDurable cannot be greater than the current lastWritten.

We can make the relaxed lastDurable update from SERVER-47898 a bit more strict that if the current lastWritten is null optime, we ignore the lastDurable call and don't check the invariant.



 Comments   
Comment by Githook User [ 23/Jan/24 ]

Author:

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

Message: SERVER-85488 Make setMyLastDurable a noop if lastWritten is null (#18233)

GitOrigin-RevId: ff059c89c357d54662d8ca99efde68b2ffd82c1b
Branch: master
https://github.com/mongodb/mongo/commit/42fae61127ce0949a1df87bec28d25daeec18801

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