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 Propagation.REQUIRES_NEW and add some comments #3140

Merged
merged 37 commits into from
Oct 10, 2020

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Sep 22, 2020

Ⅰ. Describe what this PR did

bugfix: Propagation.REQUIRES_NEW is invalid, and add some notes.

  1. 修复Propagation.REQUIRES_NEW未生效的BUG。
  2. 添加了更多注释信息。
  3. 为枚举Propagation里的每个枚举值,编写了示例代码,方便大家理解每个事务传播方式的机制。

Ⅱ. Does this pull request fix one issue?

fixes #3079

Ⅲ. 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 Sep 22, 2020

Codecov Report

Merging #3140 into develop will decrease coverage by 0.03%.
The diff coverage is 17.50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3140      +/-   ##
=============================================
- Coverage      50.37%   50.34%   -0.04%     
+ Complexity      3116     3113       -3     
=============================================
  Files            594      594              
  Lines          19625    19635      +10     
  Branches        2438     2444       +6     
=============================================
- Hits            9887     9885       -2     
- Misses          8744     8752       +8     
- Partials         994      998       +4     
Impacted Files Coverage Δ Complexity Δ
...ta/spring/annotation/GlobalTransactionScanner.java 51.51% <ø> (ø) 17.00 <0.00> (ø)
...ing/annotation/GlobalTransactionalInterceptor.java 28.47% <ø> (ø) 9.00 <0.00> (ø)
...java/io/seata/tm/api/GlobalTransactionContext.java 100.00% <ø> (ø) 6.00 <0.00> (ø)
.../java/io/seata/tm/api/transaction/Propagation.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...in/java/io/seata/tm/api/TransactionalTemplate.java 60.83% <12.50%> (-3.52%) 25.00 <0.00> (ø)
...java/io/seata/tm/api/DefaultGlobalTransaction.java 65.09% <25.00%> (-0.62%) 23.00 <0.00> (-1.00)
...a/tm/api/transaction/SuspendedResourcesHolder.java 33.33% <25.00%> (-4.17%) 1.00 <1.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 82.43% <0.00%> (-0.46%) 70.00% <0.00%> (-1.00%)

@wangliang181230 wangliang181230 changed the title bugfix: 'Propagation.REQUIRES_NEW' is invalid bugfix: 'Propagation.REQUIRES_NEW' is invalid, 'Propagation.MANDATORY' throw IllegalStateException Sep 23, 2020
@wangliang181230 wangliang181230 changed the title bugfix: 'Propagation.REQUIRES_NEW' is invalid, 'Propagation.MANDATORY' throw IllegalStateException bugfix: Propagation 'REQUIRES_NEW' is invalid, 'MANDATORY' throw IllegalStateException Sep 23, 2020
@wangliang181230 wangliang181230 changed the title bugfix: Propagation 'REQUIRES_NEW' is invalid, 'MANDATORY' throw IllegalStateException bugfix: 'Propagation.REQUIRES_NEW' is invalid Sep 23, 2020
…m-propagation-new

# Conflicts:
#	spring/src/main/java/io/seata/spring/tcc/TccActionInterceptor.java
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

@wangliang181230
Copy link
Contributor Author

I added more @see. PTAL
@lightClouds917 @a364176773 @l81893521

@wangliang181230 wangliang181230 changed the title bugfix: 'Propagation.REQUIRES_NEW' is invalid bugfix: 'Propagation.REQUIRES_NEW' is invalid, and add more tips Sep 28, 2020
@wangliang181230 wangliang181230 changed the title bugfix: 'Propagation.REQUIRES_NEW' is invalid, and add more tips bugfix: 'Propagation.REQUIRES_NEW' is invalid, and add some notes Sep 28, 2020
@slievrly slievrly changed the title bugfix: 'Propagation.REQUIRES_NEW' is invalid, and add some notes bugfix: fix Propagation.REQUIRES_NEW and add some comments Oct 10, 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

@codecov-io
Copy link

codecov-io commented Oct 10, 2020

Codecov Report

Merging #3140 into develop will decrease coverage by 0.02%.
The diff coverage is 12.90%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3140      +/-   ##
=============================================
- Coverage      50.39%   50.37%   -0.03%     
+ Complexity      3117     3114       -3     
=============================================
  Files            594      594              
  Lines          19630    19632       +2     
  Branches        2438     2442       +4     
=============================================
- Hits            9892     9889       -3     
- Misses          8744     8747       +3     
- Partials         994      996       +2     
Impacted Files Coverage Δ Complexity Δ
...ta/spring/annotation/GlobalTransactionScanner.java 51.51% <ø> (ø) 17.00 <0.00> (ø)
...ing/annotation/GlobalTransactionalInterceptor.java 28.47% <ø> (ø) 9.00 <0.00> (ø)
...java/io/seata/tm/api/GlobalTransactionContext.java 100.00% <ø> (ø) 6.00 <0.00> (ø)
.../java/io/seata/tm/api/transaction/Propagation.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...a/tm/api/transaction/SuspendedResourcesHolder.java 75.00% <ø> (+37.50%) 1.00 <0.00> (ø)
...in/java/io/seata/tm/api/TransactionalTemplate.java 60.83% <12.50%> (-3.52%) 25.00 <0.00> (ø)
...java/io/seata/tm/api/DefaultGlobalTransaction.java 65.09% <14.28%> (-0.62%) 23.00 <0.00> (-1.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 82.43% <0.00%> (-0.46%) 70.00% <0.00%> (-1.00%)

@slievrly slievrly merged commit 58f6454 into apache:develop Oct 10, 2020
@slievrly slievrly added this to the 1.4.0 milestone Oct 10, 2020
@wangliang181230 wangliang181230 deleted the bugfix-tm-propagation-new branch October 10, 2020 07:31
@wangliang181230 wangliang181230 added module/tm tm module type: bug Category issues or prs related to bug. labels Oct 16, 2020
l81893521 pushed a commit to l81893521/seata that referenced this pull request Oct 22, 2020
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.

release 1.3.0,全局事务Propagation.REQUIRES_NEW没有正常运行
7 participants