I read the 3 phase commit protocol in wikipedia (http://en.wikipedia.org/wiki/Three-phase_commit_protocol), and here is the script that came to my mind when 3PC crashes:
Suppose there are two participants A and B and a coordinator C:
1) C sent the precommit message to and before it sends the precommit message to B, both A and C simulate a failure. 2) The transaction is now restarted, and B ends its interruption because the response is from A. 3) A completes the transaction because it has already received the precommit message.
Wasn't that a problem with the original in 2PC that 3PC was supposed to address? How does 3PC solve the problem? What am I missing. Thank.
source
share