3 phase commit protocol

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.

+5
source share
3 answers

Update:

, doCommit ?

preCommit , -, .

precommit , precommit, , .

, , , preCommit, preCommit .

+2

, node . , , , , " " ( ), node , , . - node, " , node , , , .

- http://the-paper-trail.org/blog/consensus-protocols-three-phase-commit/

, , , , ; .

0

3PC , . , , 3PC , :

  • (.. , , - ( ))

  • (). , (),

  • - ( , , (.. ) , , , - , )

None of these conditions are practical. Therefore, I do not think that 3PC can be implemented in the real world.

0
source

All Articles