The Coordinator as Single Point of Failure
What you'll learn: How a coordinator crash in Two-Phase Commit can leave transactions hanging indefinitely, requiring human intervention to resolve.
The Central Problem
In Two-Phase Commit (2PC), the coordinator is the single authority that decides whether a transaction commits or aborts. If the coordinator crashes after participants have voted "yes" in the prepare phase but before sending commit/abort decisions, those participants enter a dangerous limbo state. They've already locked resources and promised to commit, but don't know the final verdict.
Why This is Critical
Imagine a conductor leading an orchestra. Everyone has their instruments ready (prepare phase complete), waiting for the downbeat. If the conductor suddenly collapses, the musicians are stuck—they can't start without the signal, but they also can't leave without permission.
Participants in this uncertain state cannot unilaterally decide to commit or abort. Why? Because other participants might have received different instructions before the crash. Committing when others abort (or vice versa) would violate transaction atomicity—the fundamental guarantee of "all or nothing."
These blocked participants:
- Hold locks on resources
- Prevent other transactions from proceeding
- Create cascading delays across the system
- Require manual intervention by database administrators to resolve
Recovery Limitations
Even with persistent logs, if the coordinator's log is corrupted or lost, there's no definitive record of the commit decision. Participants must wait for coordinator recovery, which could take minutes, hours, or require human investigation.
Key Takeaway: The coordinator in 2PC is an architectural single point of failure—its crash during the critical window between prepare and commit phases can halt transactions system-wide, making distributed transactions inherently fragile under coordinator failures.