Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pengten
Copy link
Contributor

@pengten pengten commented Mar 21, 2023

…everHappenException will be thrown

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

fix #5460
#5459

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

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.

这个pr作为临时解决方案是可以的,在处于参与者时,直接将originalException抛出去即可,但是更深层次去看,参与者是否有必要在transactionalTemplate里包装异常为ExecutionException? 如果业务一样自己用我们的模板方法去使用,最终抛出的是ExecutionException,而不是业务异常,是否应该在transactionalTemplate中处理?绕过外层GlobalTransactionalInterceptorHandler中的catch

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.

这个pr作为临时解决方案是可以的,在处于参与者时,直接将originalException抛出去即可,但是更深层次去看,参与者是否有必要在transactionalTemplate里包装异常为ExecutionException? 如果业务一样自己用我们的模板方法去使用,最终抛出的是ExecutionException,而不是业务异常,是否应该在transactionalTemplate中处理?绕过外层GlobalTransactionalInterceptorHandler中的catch

@slievrly
Copy link
Member

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2023

CLA assistant check
All committers have signed the CLA.

@pengten pengten changed the title bugfix: Using @GlobalTransactional in RM, when RM rolls back, ShouldN… bugfix: Using @GlobalTransactional in RM, ShouldNeverHappenException will be thrown Mar 28, 2023
@slievrly slievrly changed the title bugfix: Using @GlobalTransactional in RM, ShouldNeverHappenException will be thrown bugfix: fix using @GlobalTransactional in provider ShouldNeverHappenException thrown Mar 29, 2023
@slievrly slievrly merged commit b36a669 into apache:2.x Mar 29, 2023
@slievrly slievrly added this to the 2.0.0 milestone Mar 29, 2023
liuqiufeng pushed a commit to liuqiufeng/seata that referenced this pull request Apr 20, 2023
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using @GlobalTransactional in RM, when RM rolls back, ShouldNeverHappenException will be thrown

4 participants