[Paper Review] Consensus on Transaction Commit
This paper proposes Paxos Commit, a fault-tolerant transaction commit protocol that replaces the single coordinator in Two-Phase Commit with 2F+1 coordinators to ensure progress as long as a majority remain operational. By integrating the Paxos consensus algorithm, it achieves non-blocking commit even if up to F coordinators fail, while maintaining the same stable-storage write delay as Two-Phase Commit but with slightly higher message overhead in the normal case.
The distributed transaction commit problem requires reaching agreement on whether a transaction is committed or aborted. The classic Two-Phase Commit protocol blocks if the coordinator fails. Fault-tolerant consensus algorithms also reach agreement, but do not block whenever any majority of the processes are working. Running a Paxos consensus algorithm on the commit/abort decision of each participant yields a transaction commit protocol that uses 2F +1 coordinators and makes progress if at least F +1 of them are working. In the fault-free case, this algorithm requires one extra message delay but has the same stable-storage write delay as Two-Phase Commit. The classic Two-Phase Commit algorithm is obtained as the special F = 0 case of the general Paxos Commit algorithm.
Motivation & Objective
- To address the blocking problem in Two-Phase Commit, where coordinator failure halts protocol progress.
- To design a transaction commit protocol that guarantees progress as long as a majority of coordinators are functional.
- To integrate the Paxos consensus algorithm into transaction commit to achieve fault tolerance without sacrificing stability or consistency.
- To demonstrate that Two-Phase Commit is a degenerate case of Paxos Commit when F=0 (single coordinator).
Proposed method
- Uses 2F+1 coordinators instead of a single coordinator to tolerate up to F failures.
- Applies the Paxos consensus algorithm to reach agreement on the commit/abort decision across all coordinators.
- Employs a registrar process to maintain the set of joined resource managers, using Paxos to ensure consistency even if the registrar fails.
- Introduces a ballot-based mechanism where coordinators perform phase 1a and 2a messages to reach consensus on the transaction outcome.
- Uses a failure value ⊥ to indicate abortion if no consensus is reached in ballot 0, enabling graceful degradation.
- Optimizes message delay by sending phase 2a messages to a majority of acceptors, reducing communication overhead in the failure-free case.
Experimental results
Research questions
- RQ1Can a transaction commit protocol be designed to avoid blocking when a coordinator fails, while preserving safety and consistency?
- RQ2How can the Paxos consensus algorithm be adapted to solve the distributed transaction commit problem?
- RQ3What is the message and storage cost trade-off between Two-Phase Commit and a fault-tolerant alternative like Paxos Commit?
- RQ4Is Two-Phase Commit a special case of a more general fault-tolerant commit protocol?
- RQ5Under what network assumptions does a non-blocking transaction commit protocol remain correct and efficient?
Key findings
- Paxos Commit ensures progress as long as at least F+1 out of 2F+1 coordinators are operational, making it resilient to F coordinator failures.
- The protocol has the same stable-storage write delay as Two-Phase Commit, meaning I/O cost is not increased.
- In the normal (failure-free) case, Paxos Commit requires one additional message delay compared to Two-Phase Commit, but this can be optimized to minimal message delay.
- Faster Paxos Commit achieves the theoretically minimal message delay for non-blocking protocols, matching the efficiency of Guerraoui et al.'s algorithm in the absence of failures.
- Two-Phase Commit is formally equivalent to Paxos Commit with F=0, confirming that Paxos Commit generalizes the classic protocol.
- The protocol correctly handles aborts due to coordinator failure by using a special failure value ⊥, ensuring consistency even under partial failure.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.