Beta Phase: Square45 is currently in beta testing. Expect some features or content to be incomplete or missing.
45

Durability Guarantee

Once a transaction is committed, its changes are permanently stored and will survive system failures.
📜

The statement of the theorem

Let SS be the persistent storage medium and C\mathcal{C} be the commit operation for a transaction TT. Durability requires that if C\mathcal{C} returns success, the resulting state DcommitD_{commit} must be permanently recorded in SS, even if a subsequent failure F\mathcal{F} occurs. Formally, let WriteLog(Lcommit)\text{WriteLog}(L_{commit}) be the operation of flushing the commit log records LcommitL_{commit} to SS. Durability mandates that the state DcommitD_{commit} must be recoverable from SS after F\mathcal{F}, such that Dcommit=Restore(S,Lcommit)D_{commit} = \text{Restore}(S, L_{commit}). This is typically achieved by forcing the log records to stable storage before acknowledging the commit.