You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/06/09 01:34:05 UTC
[doris] branch master updated: [Fix](2PC) fix timeout config is not avaible for commit phase in 2pc (#20423)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 88911c6c28 [Fix](2PC) fix timeout config is not avaible for commit phase in 2pc (#20423)
88911c6c28 is described below
commit 88911c6c284ee88d01d9c4a12b703d43598ceb7f
Author: GoGoWen <82...@users.noreply.github.com>
AuthorDate: Fri Jun 9 09:33:58 2023 +0800
[Fix](2PC) fix timeout config is not avaible for commit phase in 2pc (#20423)
fix config::txn_commit_rpc_timeout_ms is not available for commit phase in 2pc.
---
.../src/main/java/org/apache/doris/service/FrontendServiceImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index a0d349e407..5ffcb71264 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -1238,8 +1238,9 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
if (txnOperation.equalsIgnoreCase("commit")) {
+ long timeoutMs = request.isSetThriftRpcTimeoutMs() ? request.getThriftRpcTimeoutMs() / 2 : 5000;
Env.getCurrentGlobalTransactionMgr()
- .commitTransaction2PC(database, tableList, request.getTxnId(), 5000);
+ .commitTransaction2PC(database, tableList, request.getTxnId(), timeoutMs);
} else if (txnOperation.equalsIgnoreCase("abort")) {
Env.getCurrentGlobalTransactionMgr().abortTransaction2PC(database.getId(), request.getTxnId(), tableList);
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org