Talk:Two-phase commit protocol: Difference between revisions

Content deleted Content added
Dubwai (talk | contribs)
Line 24:
1. The usual 2PC uses a timeout to avoid that the coordinator blocks forever. This is the reason why the protocol is biased towards aborts.
2. I removed the passage "Also it cannot recover from cases where a node has failed in the commit stage (due to internal or network failures) after indicating that it is ready to commit. In this case, resources that committed prior to this failure cannot be rolled back." This will never occur if the protocol is implemented properly: A cohort will only vote for commit if it can guarantee successful completion, even in the case of a failure. So, prior to voting for commit the cohort will log the necessary information for transaction redo. In addition, each cohort will keep the undo log until it has received the final decision by the coordinator. So, A cohort will never reveive an abort message without beeing prepared to abort.
---------
I don't see how this addresses the root issue. If a cohort has committed, and then later another cohort fails to commit, you can't undo the finalized commitment. You seem to be suggesting that the commitment isn't finalized until everyone has committed. That's a contradiction of terms. A commitment, by definition, is finalized. This isn't just a semantic argument. What you are suggesting is really just taking the problem out one level. If the commitment isn't yet finalized (whatever that means) then what happens if there's a failure in the 'finalization of the commitment'? You could have a finalization of the finalization of the commitment but then a failure could happen there so you'd need a finalization of the finalization of the finalization of the commitment. This is like repeatedly traveling halfway to your destination. You keep getting closer but you'll never get there.
 
And undoing a committed change is also unworkable. Once committed, the change is visible to other transactions. This violates the whole concept of committing transactions.
 
Unless someone can show some external documentation, I remain convinced that the two phase commit cannot recover reliably from a failure in the commit phase. [[User:Dubwai|Dubwai]] 21:11, 25 January 2007 (UTC)