Make setMyLastDurable a noop if lastWritten is null

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Repl 2024-02-05
    • 135
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Jiawei Yang
              Reporter:
              Jiawei Yang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: