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

fallback Method throw exception but seata does not rollback #3786

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

xjs1919
Copy link
Contributor

@xjs1919 xjs1919 commented Jul 1, 2024

Describe what this PR does / why we need it

i use seata to perform global transaction, use openfeign to invoke other microservice, and use sentinel to do fallbacks. in my fallback method if i throw an customerized Exception, this exception will be wrapped into AssertionError, then seata will not rollback correctly, beacuse seate only rollback for Exception defined in @GlobalTransactional(rollbackFor=Exception.class).

Does this pull request fix one issue?

yes

Describe how you did it

when i throw the original excetion, seata rollbacks correctly

Describe how to verify it

throw new RuntimeException('wharever') in fallback method, seata rollbacks correctly

Special notes for reviews

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


xjs1919 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@yuluo-yx
Copy link
Collaborator

yuluo-yx commented Jul 3, 2024

pls assign cla @xjs1919

@xjs1919
Copy link
Contributor Author

xjs1919 commented Jul 5, 2024

pls assign cla @xjs1919

PixPin_2024-07-05_08-11-15

Copy link
Collaborator

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

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

LGTM.

@chickenlj chickenlj merged commit d56434f into alibaba:2023.x Jul 5, 2024
2 of 3 checks passed
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.

4 participants