chenbihao commented on issue #6884:
URL: 
https://github.com/apache/incubator-seata/issues/6884#issuecomment-2380606112

   > 建议先了解下TCC事务模式和两阶段提交协议
   > 
   > 1. 第一次进行了cancel,说明你的debug行为导致一阶段的timeout,或者rpc异常,事务决议为了回滚状态
   > 2. 第二次事务重试超时就是为了防止无限重试的问题,当重试停止就应该人工介入处理这个事务
   > 3. 两阶段提交,决议后的结果不可能因为二阶段的行为而变更,否者就存在前后多个分支事务的行为不一致,这就不能达到分布式事务效果.
   > 
   > It is advisable to first understand the TCC transaction model and the 
two-phase commit protocol.
   > 
   > The first cancellation indicates that your debugging actions caused a 
timeout in the first phase or an RPC exception, leading to a rollback decision 
for the transaction. The second transaction retry timeout is designed to 
prevent infinite retries. When the retry stops, manual intervention should be 
taken to handle the transaction. In a two-phase commit, the result after the 
decision cannot be changed by the behavior of the second phase; otherwise, 
there would be inconsistencies due to multiple branch transactions, which would 
undermine the effectiveness of distributed transactions.
   
   懂了,是我钻牛角尖了,误以为提交阶段异常会回滚,
   
   有个文章说【如果 Try 阶段无法锁定资源,或者 Confirm 阶段发生异常,那么整个全局事务就会回滚】
   
   实际上try阶段做的锁定资源就是为了确保提交阶段能正常执行,
   所以【Confirm 阶段发生异常,那么整个全局事务就会回滚】这句话是不对的,这样理解对吧 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to