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

optimize: TCC two phase method return type supports void. #2770

Merged

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Jun 5, 2020

Ⅰ. Describe what this PR did

optimize: TCC phase two return type support void and BranchStatus.

此次PR的主要目的:
二阶段执行失败时,可以使用返回类型BranchStatus.PhaseTwo_XxxxxFailed_Unretryable,自主控制是否继续重试二阶段方法。
因为部分情况下,二阶段可以断定一定不会成功,此时可以自主停止重试。

修改:当前PR暂时先只添加void返回类型。是否开放BranchStatus返回类型,再讨论。

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

@wangliang181230 wangliang181230 changed the title optimize: TCC phase two return type support void and BranchStatus. optimize: TCC two phase method return type supports void and BranchStatus. Jun 5, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2020

Codecov Report

Merging #2770 into develop will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2770      +/-   ##
=============================================
- Coverage      50.19%   50.18%   -0.02%     
+ Complexity      2921     2919       -2     
=============================================
  Files            578      578              
  Lines          18724    18724              
  Branches        2253     2253              
=============================================
- Hits            9398     9396       -2     
  Misses          8396     8396              
- Partials         930      932       +2     
Impacted Files Coverage Δ Complexity Δ
.../main/java/io/seata/rm/tcc/TCCResourceManager.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...o/seata/server/coordinator/DefaultCoordinator.java 54.63% <0.00%> (-0.52%) 28.00% <0.00%> (-1.00%)
...in/java/io/seata/server/session/GlobalSession.java 83.71% <0.00%> (-0.46%) 71.00% <0.00%> (-1.00%)

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

return

PhaseTwo_CommitFailed_Unretryable

cause the global transaction stop, we can talk this later.

@l81893521 l81893521 added the module/rm rm module label Jun 9, 2020
@wangliang181230 wangliang181230 changed the title optimize: TCC two phase method return type supports void and BranchStatus. optimize: TCC two phase method return type supports void. Jun 17, 2020
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

@l81893521 l81893521 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 merged commit 0566b4a into apache:develop Jun 17, 2020
@wangliang181230 wangliang181230 deleted the return-specific-branch-status branch June 17, 2020 05:31
@slievrly slievrly added this to the 1.3.0 milestone Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/rm rm module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants