simzyoo opened a new issue, #7470:
URL: https://github.com/apache/incubator-seata/issues/7470

   ### Check Ahead
   
   - [x] I have searched the [issues](https://github.com/seata/seata/issues) of 
this repository and believe that this is not a duplicate.
   
   
   ### Ⅰ. 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);
   ```
   
   <img width="1035" alt="Image" 
src="https://github.com/user-attachments/assets/da918dd1-b6a5-4d75-8b66-2d0b4d699909";
 />
   
   c.下一步这里的处理和首次回滚处理复用了同一个方法,这里retry为true,全局事务的状态是没法转变成TimeoutRollbackRetrying的
   
   org.apache.seata.server.coordinator.DefaultCore#doGlobalRollback
   
   <img width="961" alt="Image" 
src="https://github.com/user-attachments/assets/4f70a06e-ee58-447e-bc9c-0ba2397f6028";
 />
   
   
   
我跑了一个例子验证,超时触发的回滚,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_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to