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: global session is always begin in saga mode for 2.x #5464

Merged
merged 6 commits into from
Mar 23, 2023
Merged

bugfix: global session is always begin in saga mode for 2.x #5464

merged 6 commits into from
Mar 23, 2023

Conversation

tuwenlin
Copy link
Contributor

fixes #5045
#5050 can not fix this bug,because in saga mode,when a global transactional end , TM report the global session status to TC rather than do commit or do rollback
this pr same to pr #5145,this pr just for 2.x

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.

Instead of modifying the develop.md file for the 2.x branch, Pls modify the 2.0.0.md.

@tuwenlin
Copy link
Contributor Author

Instead of modifying the develop.md file for the 2.x branch, Pls modify the 2.0.0.md.

done

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

@slievrly slievrly merged commit 7ae9c0d into apache:2.x Mar 23, 2023
@@ -134,6 +134,10 @@ public static void endCommitted(GlobalSession globalSession, boolean retryGlobal
MetricsPublisher.postSessionDoneEvent(globalSession, IdConstants.STATUS_VALUE_AFTER_COMMITTED_KEY, true,
beginTime, retryBranch);
} else {
if (globalSession.isSaga()) {
globalSession.setStatus(GlobalStatus.Committed);
Copy link
Contributor

Choose a reason for hiding this comment

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

默认的defaultcore也会调这里,也是会进行一个setstatus,不如把这行提出来,把defaultcore里的setstatus删了,这个setstatus放到if判断的前面

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

store.mode=db 事务结束后globalsession的状态未正确修改为commited
3 participants