The two phased commit is a type of ACID transaction involving multiple participants. Here, all the parties involve first agree to attempt the transaction, then all must agree to either go forward with the entire unit of work or not.
Extracted from the WS-Transaction specification:
A Coordination protocol for atomic transactions intended for resource managers (e.g., database). The coordinator first tells all 2PC participants to prepare for either a commit or abort decision, decides whether to commit or abort depending on the vote of all the 2PC participants, and then notifies the 2PC participants of the decision.
|
Phase Zero: A Coordination protocol for atomic transactions intended for caches. The coordinator notifies its PhaseZero participants that it should do what it needs to do prior to 2PC (e.g., sync its updates to a database). This protocol is preformed prior to beginning the 2PC protocol.
Phase One: The first half of the 2PC Coordination protocol, where the coordinator tells each of its 2PC participants to prepare (see prepare) to either commit or abort.
Phase Two: The second half of the 2PC Coordination protocol, where the coordinator notifies its 2PC participants of the outcome to either commit or abort.
Prepare - Make it possible to either commit or abort after the decision is made, even if a failure occurs, and then vote on the transaction outcome.
|