Distributed Transaction, 2-Phase Commit, 3-Phase Commit

A very clear article (in zh-cn) on the topic (as in the title) - http://www.hollischuang.com/archives/681

Key take-aways:

二阶段提交的算法思路可以概括为:参与者将操作成败通知协调者,再由协调者根据所有参与者的反馈情报决定各参与者是否要提交操作还是中止操作。

除了引入超时机制之外,3PC把2PC的准备阶段再次一分为二,这样三阶段提交就有CanCommitPreCommitDoCommit三个阶段。

Apparently, neither of the above algorithms is reliable enough - neither of them is able to handle network\machine\communication failures. So the solution will be.. Paxos!


猜你喜欢

转载自www.cnblogs.com/tonix/p/9694656.html