-
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 can't rollback when set rollback retry count was zero. #2777
bugfix: fix can't rollback when set rollback retry count was zero. #2777
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2777 +/- ##
=============================================
+ Coverage 50.36% 50.47% +0.11%
Complexity 2919 2919
=============================================
Files 572 572
Lines 18592 18616 +24
Branches 2199 2245 +46
=============================================
+ Hits 9363 9396 +33
- Misses 8277 8288 +11
+ Partials 952 932 -20 |
@@ -120,7 +120,7 @@ public void commit() throws TransactionException { | |||
return; | |||
} | |||
assertXIDNotNull(); | |||
int retry = COMMIT_RETRY_COUNT; | |||
int retry = COMMIT_RETRY_COUNT <= 0 ? 1 : COMMIT_RETRY_COUNT;; |
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 better to use the default value when <=0?
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.
fixed.
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
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
fix could not rollback when set rollback retry count was zero.
Ⅱ. 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