freemandealer commented on code in PR #16343: URL: https://github.com/apache/doris/pull/16343#discussion_r1095776503
########## fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java: ########## @@ -577,25 +579,30 @@ public void checkTimeout(long now) { killConnection = true; } } else { + long timeout; if (userQueryTimeout > 0) { // user set query_timeout property - if (delta > userQueryTimeout * 1000) { - LOG.warn("kill query timeout, remote: {}, query timeout: {}", - getMysqlChannel().getRemoteHostPortString(), userQueryTimeout); - - killFlag = true; - } + timeout = userQueryTimeout * 1000; } else { // default use session query_timeout - if (delta > sessionVariable.getQueryTimeoutS() * 1000) { - LOG.warn("kill query timeout, remote: {}, query timeout: {}", - getMysqlChannel().getRemoteHostPortString(), sessionVariable.getQueryTimeoutS()); + timeout = sessionVariable.getQueryTimeoutS() * 1000L; + } - // Only kill - killFlag = true; + //deal with insert stmt particularly + if (executor != null) { + StatementBase parsedStmt = executor.getParsedStmt(); + if (parsedStmt instanceof InsertStmt) { + timeout = sessionVariable.getInsertTimeoutS() * 1000L; } } + + if (delta > timeout) { + LOG.warn("kill query timeout, remote: {}, query timeout: {}", Review Comment: For INSERT statment, warn log should be about "insert timeout". Otherwise, user may increase query timeout after see this log when inserting and will be confused why it won't work. -- 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