In this lesson · topic 4 of 7
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