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.
- is depended on by
-
SERVER-47898 Advancing lastDurable irrespective of lastApplied
- Closed