Three-Phase Commit
Three-phase commit (3PC) adds a PreCommit phase on top of 2PC, eliminating the blocking caused by coordinator crashes.
Purpose
To understand non-blocking atomic commit protocols and their extra message overhead.
Mechanism
CanCommit → PreCommit → DoCommit. The PreCommit phase lets participants know a majority agrees to commit; if the coordinator crashes, participants can decide on their own (commit after timeout). Requires a synchronous-network assumption.
Use cases
- Non-blocking commit
- Distributed fault tolerance
- Coordinator failure recovery