Try
↑ ↓ move↵ openesc close
In this lesson · topic 4 of 7
  1. 1. Half of a transfer
  2. 2. Prepare, then commit
  3. 3. Crash a coordinator and count the locks
  4. 4. The coordinator that does not come back
  5. 5. Which timeout is safe
  6. 6. Three phases, and why teams skip them
  7. 7. Votes, blocking and timeouts

Topic 4

The coordinator that does not come back

5 min read

In doubt

Take the lab at its defaults. The coordinator crashed 32 timesmeasured in 400 ticks. Each time, the participants had voted yes, held their locks and heard nothing more. A participant in that state is in doubt. It cannot commit, because the decision may be abort. It cannot abort, because the decision may be commit.

The longest lock hold in the run was 30 ticksmeasured, which is the downtime of the coordinator. A healthy transaction holds its locks for 2 ticksmeasured.

Who pays

The lock is not on the crashed transaction alone. Everything that needs the same rows waits. In the lab, 128 transactionsmeasured were turned away, 16.0%measured of all those started. With no coordinator crashes that share was 0.0%measured. A longer outage makes it worse. With the coordinator down for 90 ticks, the share was 21.0%measured.

One dead process becomes a queue of waiting work. That is the meaning of blocking in two-phase commit.

Predict first

A participant voted yes and the coordinator has been silent for a minute. What may it safely do?

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms