-
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
optimize: undo log dirty throw BranchRollbackFailed_Unretriable #5051
Conversation
*/ | ||
class SQLUndoDirtyException extends SQLException { | ||
|
||
private static final long serialVersionUID = -5168905669539637570L; |
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.
都加了这个了,为什么不 implements Serializable
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.
父类实现了,子类可不实现
if (e instanceof SQLUndoDirtyException) { | ||
throw new BranchTransactionException(BranchRollbackFailed_Unretriable, | ||
String.format( | ||
"Branch session rollback failed because of dirty undo log. xid = %s branchId = %s %s", xid, |
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.
如果没意外的话,e.getMessage()就是上面的Has dirty records when undo.
,跟前面的语义有点重复了
Codecov Report
@@ Coverage Diff @@
## develop #5051 +/- ##
=============================================
- Coverage 49.45% 49.41% -0.04%
+ Complexity 4125 4124 -1
=============================================
Files 733 734 +1
Lines 26049 26054 +5
Branches 3219 3220 +1
=============================================
- Hits 12882 12875 -7
- Misses 11791 11804 +13
+ Partials 1376 1375 -1
|
rm-datasource/src/main/java/io/seata/rm/datasource/undo/SQLUndoDirtyException.java
Outdated
Show resolved
Hide resolved
* '1103' of https://github.com/zw201913/seata: optimize: remove useless code (apache#5047) bugfix: fix startup failure of Server1.5.2 by using OpenJDK 11 (apache#4874) bugfix: insert value is all parsed as string in insert on duplicate (apache#5028) bugfix: global session is not change to Committed in saga mode (apache#5050)
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
.format("Branch session rollback failed and try again later xid = %s branchId = %s %s", xid, | ||
branchId, e.getMessage()), e); | ||
if (e instanceof SQLUndoDirtyException) { | ||
throw new BranchTransactionException(BranchRollbackFailed_Unretriable, |
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.
描述上要加一些需要人工介入的提示
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.
@zw201913 please take a look on the check style error.
fixes #4997