In this lesson · topic 7 of 7
Topic 7
Votes, blocking and timeouts
3 min read
Predict first
Predict first
Predict first
Take away
- Two-phase commit makes a transaction commit on every participant or on none.
- A yes vote is a promise that cannot be taken back, and a logged decision is final.
- The price is two rounds, forced log writes and locks held across the network.
- A coordinator that crashes after the votes leaves participants in doubt, and the locks stay until the outcome is known.
- A prepared participant must not abort on its own. Asking peers helps only if one of them heard.
- Three-phase commit avoids blocking by assuming the network does not split, so it is rarely used.
Sources
- Jim Gray and Leslie Lamport, Consensus on Transaction Commit, ACM Transactions on Database Systems, 2006.
- Philip A. Bernstein, Vassos Hadzilacos and Nathan Goodman, Concurrency Control and Recovery in Database Systems, Addison-Wesley, 1987.
- Dale Skeen, Nonblocking commit protocols, SIGMOD, 1981.
- C. Mohan, Bruce Lindsay and Ron Obermarck, Transaction management in the R* distributed database management system, ACM Transactions on Database Systems, 1986.