Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

事务回滚重试超时后,DB会话存储的模式下会将全局事务删除掉,接下来还有修改事务状态的逻辑 #5295

Closed
1 task
ZhangShiYeChina opened this issue Feb 3, 2023 · 1 comment · Fixed by #5298
Assignees

Comments

@ZhangShiYeChina
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

版本:1.6.1
DefaultCoordinator#handleRetryRollbacking方法中,当遇到事务回滚重试 发生了超时,会包含以下逻辑:

  1. DB模式下,会从global_table中删除此事务记录(removeGlobalSession(...)方法中会删除)
  2. 将此事务状态变更为 RollbackRetryTimeout
    疑问DB层面已删除,此处修改状态什么作用?

DefaultCoordinator#handleRetryCommitting也存在同样的情况。

Ⅱ. Describe what happened

如下图所示
image

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

针对这个疑问跟社区的 【a364176773】 进行探讨,初步结论是 可按照Seata后续的能力规划对此处进行修改:

  • 如此上下文中重试回滚超时异常类的事务,不再由每秒执行一次的定时任务来自动删除
  • 把这类异常事务记录保留下来,之后在控制台侧增加功能来管控这类异常事务。

那么当下对应的修改可为:

  • 将上边的removeGlobalSession逻辑删除掉。

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version : 8
  • Seata version: 1.6.1
  • OS :
  • Others:
@funky-eyes
Copy link
Contributor

This should be a bug, this line of code should be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants