SaintBacchus commented on code in PR #17837: URL: https://github.com/apache/doris/pull/17837#discussion_r1138467860
########## fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java: ########## @@ -652,16 +644,31 @@ public String getCurrentConnectedFEIp() { return currentConnectedFEIp; } + /** + * Keep it just for directly controlling kill_thread_timeout in {@link #checkTimeout(long)} + */ public void setExecTimeout(int timeout) { executionTimeoutS = timeout; } - public long resetExecTimeoutByInsert() { - executionTimeoutS = Math.max(executionTimeoutS, sessionVariable.getInsertTimeoutS()); - return executionTimeoutS; - } - + /** + * We calculate and get the exact execution timeout here, rather than setting + * execution timeout in many other places. + * + * @return exact execution timeout + */ public int getExecTimeout() { + userQueryTimeout = Env.getCurrentEnv().getAuth().getQueryTimeout(qualifiedUser); Review Comment: this is a temp value of uer timeout. If user timeout was -1, it will make the killer thread bad. In my suggestion, do not modify the value of executionTimeoutS in `getExecTimeout()` just return the right value. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org