-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Open
Description
Check Ahead
- I have searched the issues of this repository and believe that this is not a duplicate.
AT 模式下 ,怎样的流程才能让TC端的全局事务状态变为TimeoutRollbackRetrying ? #5293
我看这个issuce也提了这个问题,但是我在2.4版本上复现了这个问题,我在提交里也没看到相关的问题修复。这个问题确定得到修复了吗?
Ⅰ. Issue Description
从代码来看,全局事务的状态要进入到TimeoutRollbackRetrying,路径如下:
a.从这里超时的全局事务状态从beigin 变成 TimeoutRollbacking
org.apache.seata.server.coordinator.DefaultCoordinator#init
timeoutCheck.scheduleAtFixedRate(
() -> SessionHolder.distributedLockAndExecute(TX_TIMEOUT_CHECK, this::timeoutCheck), 0,
TIMEOUT_RETRY_PERIOD, TimeUnit.MILLISECONDS);
b.然后下面这个定时任务会重试回滚处于TimeoutRollbacking状态的全局事务
org.apache.seata.server.coordinator.DefaultCoordinator#init
retryRollbacking.scheduleAtFixedRate(
() -> SessionHolder.distributedLockAndExecute(RETRY_ROLLBACKING, this::handleRetryRollbacking), 0,
ROLLBACKING_RETRY_PERIOD, TimeUnit.MILLISECONDS);

c.下一步这里的处理和首次回滚处理复用了同一个方法,这里retry为true,全局事务的状态是没法转变成TimeoutRollbackRetrying的
org.apache.seata.server.coordinator.DefaultCore#doGlobalRollback

我跑了一个例子验证,超时触发的回滚,server不断重试,但全局事务的状态仍然是TimeoutRollbacking,也就是我认为TimeoutRollbackRetrying目前是一个无法到达的全局事务状态。
Ⅱ. Describe what happened
同上
Ⅲ. Describe what you expected to happen
No response
Ⅳ. How to reproduce it (as minimally and precisely as possible)
No response
Ⅴ. Anything else we need to know?
No response
Ⅵ. Environment
No response
Metadata
Metadata
Assignees
Labels
No labels