I was reading 3 phase commit protocol on wikipedia (http://en.wikipedia.org/wiki/Three-phase_commit_protocol) and here is a scenario that came to my mind where 3PC will fail:
Assume there are two participants A and B and a Coordinator C:
1)C sent precommit message to A and before it sends precommit message to B both A and C simulataneously fail. 2)The transaction is now restarted and B ends up aborting it because no reply from A. 3)A commits the transaction because its has already got the precommit message.
Wasn't this also the original problem in 2PC that 3PC was supposed to address? How is 3PC solving the problem? What am I missing. Thanks.