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 when TC returns RollbackFailed FailureHandler not executed #5362

Merged
merged 4 commits into from Feb 20, 2023

Conversation

ZhangShiYeChina
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

fixes :#5231

image

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

@ZhangShiYeChina ZhangShiYeChina changed the title bugfix: fix when TC returns RollbackFailed FailureHandler not executed #5321 bugfix: fix when TC returns RollbackFailed FailureHandler not executed Feb 20, 2023
@funky-eyes funky-eyes added this to the 2.0.0 milestone Feb 20, 2023
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

@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/tm tm module labels Feb 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #5362 (1330765) into 2.x (83bfaf3) will increase coverage by 0.01%.
The diff coverage is 22.22%.

❗ Current head 1330765 differs from pull request most recent head dcb4572. Consider uploading reports for the commit dcb4572 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5362      +/-   ##
============================================
+ Coverage     48.53%   48.55%   +0.01%     
+ Complexity     4301     4300       -1     
============================================
  Files           775      771       -4     
  Lines         27372    27358      -14     
  Branches       3408     3410       +2     
============================================
- Hits          13285    13283       -2     
+ Misses        12684    12671      -13     
- Partials       1403     1404       +1     
Impacted Files Coverage Δ
...in/java/io/seata/tm/api/TransactionalTemplate.java 58.90% <22.22%> (-1.97%) ⬇️
...ver/storage/redis/lock/RedisDistributedLocker.java 59.09% <0.00%> (-13.64%) ⬇️
...erver/storage/file/session/FileSessionManager.java 61.14% <0.00%> (-0.64%) ⬇️
...rage/redis/store/RedisTransactionStoreManager.java 77.12% <0.00%> (-0.26%) ⬇️
...n/src/main/java/io/seata/common/DefaultValues.java 0.00% <0.00%> (ø)
...ava/io/seata/integration/tx/api/util/JsonUtil.java 0.00% <0.00%> (ø)
.../io/seata/common/exception/JsonParseException.java
.../seata/integration/tx/api/json/JsonParserWrap.java
...main/java/io/seata/rm/tcc/json/GsonJsonParser.java
...ata/integration/tx/api/json/JsonParserFactory.java
... and 4 more

code = TransactionalExecutor.Code.TimeoutRollback;
break;
case Rollbacked:
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得只有Rollbacked是RollbackDone吧?如果真的到default了是不是该抛个其他异常了?

Copy link
Member

Choose a reason for hiding this comment

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

Consider the compatibility of high and low versions (client is a low version, server is a high version and the new state), do not throw exceptions.You can just print a log.

case RollbackRetrying:
code = TransactionalExecutor.Code.RollbackRetrying;
break;
case TimeoutRollbacking:
Copy link
Member

Choose a reason for hiding this comment

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

The next pr will removes the TimeRollback state of the client

@slievrly slievrly merged commit 36a9402 into apache:2.x Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/tm tm module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants