Two-Phase Commit and Prepared State

Trace the votes and durable decision in an atomic commit protocol and explain why a prepared participant can remain blocked.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Prepare collects the promises required for commit
  2. A yes voter must learn the decision before releasing its promise

Prepare collects the promises required for commit

A coordinator requests votes. A participant voting yes puts its operations in a prepared state that it can later commit under the protocol. A commit decision requires all required yes votes. A no vote permits abort. The coordinator communicates the decision, with durable records ensuring recovery is consistent with what was already announced.

A yes voter must learn the decision before releasing its promise

After voting yes, a participant missing the decision cannot generally infer whether another participant received commit. Unilaterally aborting might disagree with a committed outcome elsewhere. Recovery and replication of decision state can reduce the blocking under specific models. Write-ahead logging addresses local records needed for such persistence. Distributed transactions compare commit coordination with other consistency guarantees.[1]

References

  1. Jim Gray and Leslie Lamport, Consensus on Transaction Commit ↩