apache / apache/incubator-seata

seata集群,saga模式下,频繁出现超时回滚

Open
#4,852 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

seata版本1.5.1,注册到nacos两个节点,客户端采用saga模式,正常情况下,一个事务请求会被分配到一个seata节点管理,如图:
image
业务流程正常结束,事务被committed。但测试的时候经常发现,当一个事务请求被分配到一个节点后,这个事务的部分日志会出现在另一个节点,那么此时,就算业务流程已经执行完毕,也不会打印committed那条日志,如图:
接收请求的seata节点日志:
image
另一个节点:
image
之后,seata服务节点会一直等待超时,这个超时时间是由这个参数:transOperationTimeout控制的,默认值1800000ms。
到了超时时间,若客户端与服务端已经断开连接,服务端就会一直报错:Failed Rollback,1s一次。
若连接未断开,则会打印如下日志:
image
对客户端进行整体回滚,但这之前业务其实已经执行成功了!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the report with Seata 1.5.1, two Nacos-registered Seata nodes, and a Saga transaction. Compare the transaction logs on both nodes, then inspect the behavior around the transOperationTimeout expiry with the client connection both open and closed. Done means the completed business transaction is not later rolled back or left repeatedly reporting Failed Rollback.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.