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!

原文地址:https://www.cnblogs.com/tonix/p/9694656.html

时间: 2024-08-09 15:40:57

Distributed Transaction, 2-Phase Commit, 3-Phase Commit的相关文章

django 事务错误 -- Transaction managed block ended with pending COMMIT/ROLLBACK

1 Request Method: GET 2 Request URL: http://192.168.128.111:8000/×××/××××/ 3 Django Version: 1.4.8 4 Exception Type: TransactionManagementError 5 Exception Value: 6 Transaction managed block ended with pending COMMIT/ROLLBACK 今天在做事务处理的时候老是出现这个问题,我研究了

ORA-01591: lock held by in-doubt distributed transaction问题解决

昨天跑批量数据的程序时遇到oracle错误: $tail -f INDB_ERROR_8.LOG [Time]2014-12-01 04:10:31: activeAccountDeposit in oracle error: =ORA-01591: lock held by in-doubt distributed transaction 20.21.65527021 [Time]2014-12-01 04:10:31: 文件:/billing/drecv4/drecvlog/201411/D

【翻译自mos文章】services与rac中的 Distributed Transaction Processing (DTP)

来源于: Services and Distributed Transaction Processing in Oracle RAC(DTP) (文档 ID 1307751.1) APPLIES TO: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.5 [Release 10.2] Information in this document applies to any platform. SYMPTOMS Yo

Distributed Transaction Coordinator(DTC)一些问题的解决方法

有时运行某个程序或者安装SQL Server时报错. 错误信息: 事务管理器不可用.(从 HRESULT 异常: 0x8004D01B) 启动服务Distributed Transaction Coordinator后正常. 执行: C:\net start msdtc 但有时启动Distributed Transaction Coordinator时报错. 错误信息:在本地计算机上,Windows 无法启动分布式事务处理协调器.更多的信息,请查看系统事件日志中.如果这是一种非 Microsof

The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

同事反馈一个系统在运行一个存储过程时遇到了下面错误: Msg 1206, Level 18, State 169, Procedure xxxxxx, Line 118The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction. 费了九牛二虎之力才定位到是我们一个作业把对应的会话给Kill掉了(此作业按条件Kill掉那些阻塞其它会话的会话).今天在测试服务

Distributed Transaction Coordinator 服务无法启动解决方案

在使用TransactionScope 类时遇到的问题.“服务器****上的MSDTC不可用.” 在命令行下输入net start msdtc,启动失败. 到“服务”中启动,提示“windows 不能在 本地计算机启动 Distributed Transaction Coordinator .有关更多信息,查阅系统事件日志.如果这是非 Microsoft 服务,请与厂商联系,并参考特定服务错误代码 -**********” 查看所依赖的服务Remote Procedure Call(RPC)和

[C#] 排除无须纳入交易的查询,避免产生不必要的分散式交易 (Distributed Transaction)

当不小心启用分散式事务机制时,且环境设定不允许时,就会产生[已停用分散式事务管理员 (MSDTC) 的网络存取.请使用组件服务系统管理工具启用 DTC,以使用 MSDTC 安全性设定中的网络存取]错误消息,此时可以透过?new TransactionScope(TransactionScopeOption.Suppress) 排除不需要纳入事务的部分,避免分散事务的情境产生. 前言 当操作不同 DB 服务器且需要在同一个事务下完成,就需要使用分散式事务(Distributed Transacti

The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "server_name" was unable to begin a distributed transaction.

Question: insert into #tmp exec usp_xxxx 报错 The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "server_name" was unable to begin a distributed transaction. Answer: 将linkserver Enable Promotion of

Transaction not successfully started&&Could not commit Hibernate transaction;

记录一下这个问题,解决方法是分两种情况, 一种是getCurrentSession();这种情况加入配置:<property name="hibernate.current_session_context_class">thread</property> 一种是:getSession的 在修改操作后加上 finally   {       session.close();      }