Two-phase commit starts with one coordinator and a fixed participant set.

highlighted = computed this step

Coordinator and participants

A coordinator asks participants to agree on one decision. This exact surface keeps only names, events, votes, and states. Note: timing, retries, recovery, and availability are outside the trace.

finite state trace\text{finite state trace}

The role set is pinned

The compiled trace has 2 participants and 2 snapshots after prepare is replayed. The diagram is the recomputed FSM table, not an authored sketch.

participants=2,snapshots=2\text{participants}=2,\quad \text{snapshots}=2

two-phase commit is rendered here as a tiny exact FSM trace; timeouts, recovery, network partitions, availability, and database-product behavior are out of scope.

Coordinator and participantseventcoordinatordecisionvotesparticipantsinitialinitpendingnoneP1:init, P2:initprepare CwaitingpendingnoneP1:prepared, P2:prepared participant statesparticipantvotestateP1nonepreparedP2noneprepared compiled summaryfactvaluedecisionpendingoutcomependingcoordinatorwaitingcommitAllowednoabortReasonnone

Summary

Two-phase commit starts with a coordinator and a fixed participant set. Note: the model is an FSM over tiny pinned strings, not a product protocol guide.

roles are explicit inputs\text{roles are explicit inputs}