-
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
feature:Transfer global timeout and branch transaction begin time #7164
base: 2.x
Are you sure you want to change the base?
feature:Transfer global timeout and branch transaction begin time #7164
Conversation
RootContext.setTimeout(timeout); | ||
RootContext.setBranchBeignTime(createTime); |
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.
integration模块中需要传递两个值
Two values need to be passed in the integration module
transactionTimeout = DefaultValues.DEFAULT_GLOBAL_TRANSACTION_TIMEOUT; | ||
} | ||
timeout = Math.max(BRANCH_EXECUTION_TIMEOUT, transactionTimeout); | ||
branchBeginTime = RootContext.getBranchBeignTime(); |
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.
I don't see this branchBeginTime value being passed from the downstream service, and if it's not passed, it's no different from the previous function. Or what you're trying to say is timeout is the timeout of a branch transaction not the timeout of a global transaction?
@@ -113,6 +113,8 @@ public void begin(int timeout, String name) throws TransactionException { | |||
xid = transactionManager.begin(null, null, name, timeout); | |||
status = GlobalStatus.Begin; | |||
RootContext.bind(xid); | |||
RootContext.setTimeout(timeout); | |||
RootContext.setBranchBeignTime(createTime); |
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.
If I set this value here I think it is ambiguous, the time here should be the start time of the global transaction and not the begin time of the branch transaction.
Ⅰ. Describe what this PR did
XA模式用到的全局超时时间没有使用单独配置,需要传递全局超时时间和分支事务开始时间
The global timeout time used in the XA Mode is not configured separately, and the global timeout time and branch transaction start time need to be passed.
Ⅱ. 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