Stuck Holding The Locks

One coordinator, three participants, one distributed transaction over 2PC. The coordinator is a single process with a local transaction log.

t coordinator P1 P2 P3
1 sends PREPARE to all idle idle idle
2 collecting votes logs PREPARED, holds locks, votes yes logs PREPARED, holds locks, votes yes logs PREPARED, holds locks, votes yes
3 writes COMMIT to its own log prepared prepared prepared
4 process killed before any COMMIT is sent prepared prepared prepared

The coordinator will be down for the next 40 minutes. What may the three participants legitimately do in the meantime?

A

Promote P1 to coordinator and re-run the prepare phase, so the surviving participants converge on a decision without the original coordinator.

B

Nothing but wait, still holding their locks. A yes vote is a promise, so none of them may decide unilaterally, and none of them knows the outcome, so talking to each other does not resolve it either.

C

Time out and abort. No decision arrived within the protocol's window, and abort is the safe default when the outcome is unknown.

D

Commit. Each one has a durable PREPARED record, and a participant that voted yes has by definition already validated everything the commit needs.