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

bugfix: fix can't rollback when set rollback retry count was zero. #2777

Merged
merged 9 commits into from
Jun 9, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void commit() throws TransactionException {
return;
}
assertXIDNotNull();
int retry = COMMIT_RETRY_COUNT;
int retry = COMMIT_RETRY_COUNT <= 0 ? DEFAULT_TM_COMMIT_RETRY_COUNT : COMMIT_RETRY_COUNT;
try {
while (retry > 0) {
try {
Expand Down Expand Up @@ -156,7 +156,7 @@ public void rollback() throws TransactionException {
}
assertXIDNotNull();

int retry = ROLLBACK_RETRY_COUNT;
int retry = ROLLBACK_RETRY_COUNT <= 0 ? DEFAULT_TM_ROLLBACK_RETRY_COUNT : ROLLBACK_RETRY_COUNT;
try {
while (retry > 0) {
try {
Expand Down