-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
bugfix: TM rollback fail throw the seata exception, rollback retrying throw NPE #2760
bugfix: TM rollback fail throw the seata exception, rollback retrying throw NPE #2760
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2760 +/- ##
=============================================
+ Coverage 50.05% 50.17% +0.12%
Complexity 2949 2949
=============================================
Files 588 588
Lines 18907 18931 +24
Branches 2241 2284 +43
=============================================
+ Hits 9463 9498 +35
- Misses 8478 8489 +11
+ Partials 966 944 -22 |
only TCC have the issue of appeal? |
目前我测的是TCC会触发此BUG。其他事务模式还不确定。 |
能否提供复现流程,以及如果更改后对AT是否会有影响需要一个测试 |
我检索过源码,这行代码必定会抛空指针异常。TransactionalExecutor.Code为RollbackRetrying时,只写入了originalException,并没有写入cause。 |
ok,我稍后测试下这个异常. |
复现是当全局事务异常时,二阶段回滚失败时,会复现。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not change the other TransactionalExecutor.ExecutionException constructor in
io.seata.tm.api.TransactionalTemplate#rollbackTransaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
BUG描述:
1、TM在往TC发起回滚请求时,如果连接TC超时了,会向外抛出超时异常,但实际上需要往外抛的是业务异常。
2、TM在往TC发起回滚请求时,RM端回滚失败导致全局事务进入RollbackRetrying状态时,触发了空指针异常。
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews