This is an automated email from the ASF dual-hosted git repository. zhangchen 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 5d218388f3 [enhancement](stmt-forward) make fe follower err msg shown to client be consistent with master (#18180) 5d218388f3 is described below commit 5d218388f3f9d5709243ae0dc86ffe616e4b9a16 Author: 奕冷 <82279870+tangsiyang2...@users.noreply.github.com> AuthorDate: Tue Mar 28 21:27:45 2023 +0800 [enhancement](stmt-forward) make fe follower err msg shown to client be consistent with master (#18180) Found that RPC timeout is too short that RPC client will close before execute result is return. Therefore, use a coefficient to prolong the RPC client timeout, so that it can wait for the real cause to be recieved. --- fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java | 6 ++++-- fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java index 4f0036a6e5..5167612dd1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java @@ -42,6 +42,8 @@ import java.util.Map; public class MasterOpExecutor { private static final Logger LOG = LogManager.getLogger(MasterOpExecutor.class); + private static final float RPC_TIMEOUT_COEFFICIENT = 1.2f; + private final OriginStatement originStmt; private final ConnectContext ctx; private TMasterOpResult result; @@ -56,11 +58,11 @@ public class MasterOpExecutor { this.originStmt = originStmt; this.ctx = ctx; if (status.isNeedToWaitJournalSync()) { - this.waitTimeoutMs = ctx.getExecTimeout() * 1000; + this.waitTimeoutMs = (int) (ctx.getExecTimeout() * 1000 * RPC_TIMEOUT_COEFFICIENT); } else { this.waitTimeoutMs = 0; } - this.thriftTimeoutMs = ctx.getExecTimeout() * 1000; + this.thriftTimeoutMs = (int) (ctx.getExecTimeout() * 1000 * RPC_TIMEOUT_COEFFICIENT); // if isQuery=false, we shouldn't retry twice when catch exception because of Idempotency this.shouldNotRetry = !isQuery; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index d7c9a8442e..b491199eb7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -1849,6 +1849,7 @@ public class SessionVariable implements Serializable, Writable { TQueryOptions queryOptions = new TQueryOptions(); queryOptions.setMemLimit(maxExecMemByte); queryOptions.setQueryTimeout(queryTimeoutS); + queryOptions.setInsertTimeout(insertTimeoutS); return queryOptions; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org