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

Conversation

l81893521
Copy link
Contributor

Ⅰ. 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

@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2020

Codecov Report

Merging #2777 into develop will increase coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              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     
Impacted Files Coverage Δ Complexity Δ
...java/io/seata/tm/api/DefaultGlobalTransaction.java 65.71% <0.00%> (-1.91%) 24.00 <0.00> (ø)
...o/seata/server/storage/redis/lock/RedisLocker.java 37.96% <0.00%> (-0.72%) 10.00% <0.00%> (ø%)
...in/java/io/seata/server/session/GlobalSession.java 83.71% <0.00%> (-0.55%) 71.00% <0.00%> (ø%)
...rage/redis/store/RedisTransactionStoreManager.java 36.05% <0.00%> (-0.53%) 20.00% <0.00%> (ø%)
...java/io/seata/spring/tcc/TccActionInterceptor.java 11.36% <0.00%> (-0.27%) 2.00% <0.00%> (ø%)
...n/java/io/seata/rm/datasource/ConnectionProxy.java 28.00% <0.00%> (-0.23%) 13.00% <0.00%> (ø%)
...a/io/seata/core/rpc/netty/AbstractRpcRemoting.java 9.28% <0.00%> (-0.16%) 5.00% <0.00%> (ø%)
...in/java/io/seata/server/session/BranchSession.java 78.10% <0.00%> (+0.07%) 44.00% <0.00%> (ø%)
...a/server/storage/db/store/LogStoreDataBaseDAO.java 71.76% <0.00%> (+0.09%) 34.00% <0.00%> (ø%)
...in/java/io/seata/tm/api/TransactionalTemplate.java 64.34% <0.00%> (+0.31%) 25.00% <0.00%> (ø%)
... and 22 more

@@ -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;;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@l81893521 l81893521 added the module/tm tm module label Jun 8, 2020
Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly changed the title bugfix: fix could not rollback when set rollback retry count was zero. bugfix: fix can't rollback when set rollback retry count was zero. Jun 9, 2020
@slievrly slievrly merged commit cf6957b into apache:develop Jun 9, 2020
@slievrly slievrly added this to the 1.3.0 milestone Jun 12, 2020
@l81893521 l81893521 deleted the fix_rollback_retry_count_zero branch July 9, 2020 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/tm tm module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants