TangSiyang2001 commented on code in PR #17837:
URL: https://github.com/apache/doris/pull/17837#discussion_r1138499170


##########
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:
     If user timeout was -1, we will not use it as execution timeout, and will 
use session var instead. And in ConnectContext#checkTimeout, we directly use 
executionTimeout for kill thread timeout checking. If we can change the 
setExecTimeout behavior in `MysqlLoadManager#executeMySqlLoadJobFromStmt`, the 
problem will be completely solved. Then we an just use the getter the fetch the 
execution timeout every time, remove the redundant setter and can even remove 
the field `executionTimeout` in ConnectContext.



-- 
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

Reply via email to