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

Make setMyLastDurable a noop if lastWritten is null

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

      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@mongodb.com Jiawei Yang
            Reporter:
            jiawei.yang@mongodb.com Jiawei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: