System InternalsLearn ↗Two-Phase CommitPREPARECOMPLETECRASHRECOVER

Two-Phase Commit — pick a scenario

0/3 done

Pick one and press Start, then click Next › to step through it.

Watch for

Participants frozen in the 'prepared/uncertain' state while the coordinator is down — holding locks, unable to proceed until it returns.

More about this scenario
You'll learn

The defining weakness of two-phase commit — a coordinator failure can leave participants blocked and uncertain.

How it runs

PREPARE collects yes-votes and locks each participant. The coordinator crashes before sending commit, so participants are stuck — they've promised to commit but can't decide alone. RECOVER replays the coordinator's log and COMPLETE finishes the commit.