-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Conversation
# Conflicts: # changes/en-us/develop.md # changes/zh-cn/develop.md
There was a problem hiding this 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.
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -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); |
There was a problem hiding this comment.
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判断的前面
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