-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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: fix TC retry rollback wrongly, after the XA transaction fail and rollback #5833
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5833 +/- ##
=============================================
+ Coverage 48.80% 48.88% +0.07%
- Complexity 4165 4172 +7
=============================================
Files 793 793
Lines 28003 28003
Branches 3417 3417
=============================================
+ Hits 13668 13690 +22
+ Misses 12911 12889 -22
Partials 1424 1424
|
rm-datasource/src/main/java/io/seata/rm/datasource/xa/ConnectionProxyXA.java
Outdated
Show resolved
Hide resolved
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 补充下changlog
已补充 |
DefaultResourceManager.get().branchReport(BranchType.XA, xid, xaBranchXid.getBranchId(), | ||
status, null); | ||
} catch (TransactionException te) { | ||
LOGGER.warn("Failed to report XA branch " + status + " on " + xid + "-" + xaBranchXid.getBranchId() |
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.
use log placeholder {}
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.
use log placeholder {}
already modified
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.
Is it reasonable to evaluate PhaseTwo_CommitFailed_XAER_NOTA_Retryable and PhaseTwo_RollbackFailed_XAER_NOTA_Retryable in other ways? Whether it is possible to change the status to NoRetryable.
There are other situations that can also cause XAException, so RM needs to return Retryable to TC. |
Ⅰ. Describe what this PR did
修复bug #5832 。当XA分支事务回滚后,报告给TC,避免TC不知道重试回滚
Ⅱ. Does this pull request fix one issue?
fixes #5832
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews