waitUntilDurable call spanning rollback can set lastDurable ahead of journaling

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-10-19
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A waitUntilDurable call can span the lifetime of a rollback and cause us to set lastDurable ahead of journaling as follows:

      • lastApplied = OpTime(2,2), lastDurable = OpTime(1,1)
      • Asynchronous thread decides to set lastDurable to OpTime(2,2)
      • Rollback occurs. lastApplied = OpTime(1,1), lastDurable = OpTime(1,1)
      • Apply oplog entry. lastApplied = OpTime(1,2), lastDurable = OpTime(1,1)
      • Apply oplog entry. lastApplied = OpTime(3,3), lastDurable = OpTime(1,1)
      • Asynchronous thread succeeds in setting lastDurable to OpTime(2,2). This is not a time in the oplog. Additionally, this implies that OpTime(1,2) is journaled, which it is not.

      I don't think this can cause us to incorrectly respond to a client that a write is journaled or majority committed. However, it seems possible to violate internal invariants.

              Assignee:
              Lingzhi Deng
              Reporter:
              Tess Avitabile (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: