You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "TangSiyang2001 (via GitHub)" <gi...@apache.org> on 2023/02/01 13:52:58 UTC

[GitHub] [doris] TangSiyang2001 opened a new pull request, #16343: [Enhancement-WIP] set insert_into timeout session variable separately

TangSiyang2001 opened a new pull request, #16343:
URL: https://github.com/apache/doris/pull/16343

   # Proposed changes
   
   Issue Number: close #16301
   
   ## Problem summary
   
   Because of the current query_timeout default value is relatively small, users will not notice the INSERT INTO timeout. We can set a separate timeout for INSERT IN.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [x] No
   
   ## Further comments
   Docs and regression tests will be added if needed.
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423497510

   > Nice work, thanks for your contribution. I've two suggestion here:
   > 
   >     1. please add some unit test, there are some cases relate to `query_timeout` in FE's code, you can refer to them.
   > 
   >     2. in some regression test, e.g. `regression-test/suites/ssb_sf0.1_p1/load.groovy`, we set `query_timeout` to 3600 to make sure the insert into select statement can execute success, we can replace all of these options to `insert_timeout`.
   
   Recieved, will be done later.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1096969319


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

Review Comment:
   Modified.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1099735801


##########
be/src/runtime/runtime_state.h:
##########
@@ -86,6 +86,8 @@ class RuntimeState {
     }
     int max_errors() const { return _query_options.max_errors; }
     int query_timeout() const { return _query_options.query_timeout; }
+    int insert_timeout() const { return _query_options.insert_timeout; }

Review Comment:
   seems not used?



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1422133638

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413086167

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1424281011

   > If a user set query timeout for insert in elder version, we can not work. so we should set insert_timeout = max(query_timeout, insert_timeout).
   
   Actually I think set executionTimeout to max(query_timeout, insert_timeout) is equivalent, and I actually made it in `setExecTimeout`.
   


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement-WIP](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1093343544


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -285,6 +286,9 @@ public class SessionVariable implements Serializable, Writable {
     @VariableMgr.VarAttr(name = QUERY_TIMEOUT)
     public int queryTimeoutS = 300;
 
+    @VariableMgr.VarAttr(name = INSERT_TIMEOUT)
+    public int insertTimeoutS = 3000;

Review Comment:
   roger taht



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425056329

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423723619

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1418557761

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1421834934

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425175973

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1099809607


##########
be/src/runtime/runtime_state.h:
##########
@@ -86,6 +86,8 @@ class RuntimeState {
     }
     int max_errors() const { return _query_options.max_errors; }
     int query_timeout() const { return _query_options.query_timeout; }
+    int insert_timeout() const { return _query_options.insert_timeout; }

Review Comment:
   Great. Just keep it.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1418554617

   ```bash
   mysql> select count(*) from insert_test;
   +----------+
   | count(*) |
   +----------+
   | 14000000 |
   +----------+
   1 row in set (0.07 sec)
   
   mysql> set query_timeout = 3;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> set insert_timeout = 20;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> insert into insert_test_dst select * from insert_test limit 10000000;
   Query OK, 10000000 rows affected (7.13 sec)
   {'label':'insert_37fa05e44b34d15_b3ae7dc924ca4b6a', 'status':'VISIBLE', 'txnId':'3036'}
   
   mysql> set insert_timeout = 3;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> insert into insert_test_dst select * from insert_test limit 10000000;
   ERROR 1105 (HY000): errCode = 2, detailMessage = Execute timeout
   
   mysql> set query_timeout = 15;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> insert into insert_test_dst select * from insert_test limit 10000000;
   Query OK, 10000000 rows affected (7.49 sec)
   {'label':'insert_df7ac58fca0c428d_b5ea947bc3abe5de', 'status':'VISIBLE', 'txnId':'3039'}


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1099761327


##########
be/src/runtime/runtime_state.h:
##########
@@ -86,6 +86,8 @@ class RuntimeState {
     }
     int max_errors() const { return _query_options.max_errors; }
     int query_timeout() const { return _query_options.query_timeout; }
+    int insert_timeout() const { return _query_options.insert_timeout; }

Review Comment:
   Yes, I made this redundance on purpose as an access to insert_timeout val just for future use. If we need to remove it, then the query_timeout() method can also be removed because it's redundant too. Should I remove them then?



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement-WIP](Stmt) Set insert_into timeout session variable separately

Posted by github-actions.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1412244818

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413061450

   ```bash
   mysql> show variables like 'insert_timeout';
   +----------------+-------+
   | Variable_name  | Value |
   +----------------+-------+
   | insert_timeout | 14400 |
   +----------------+-------+
   1 row in set (0.00 sec)
   
   mysql> set session insert_timeout=28800;
   Query OK, 0 rows affected (0.01 sec)
   
   mysql> show variables like 'insert_timeout';
   +----------------+-------+
   | Variable_name  | Value |
   +----------------+-------+
   | insert_timeout | 28800 |
   +----------------+-------+
   1 row in set (0.00 sec)


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1094073674


##########
docs/en/docs/advanced/variables.md:
##########
@@ -76,6 +76,7 @@ Variables that support both session-level and global-level setting include:
 * `allow_partition_column_nullable`
 * `insert_visible_timeout_ms`
 * `enable_fold_constant_by_be`
+* `insert_timeout`

Review Comment:
   I did a  global search and updated all the docs I thought demanded.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement-WIP](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1093343544


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -285,6 +286,9 @@ public class SessionVariable implements Serializable, Writable {
     @VariableMgr.VarAttr(name = QUERY_TIMEOUT)
     public int queryTimeoutS = 300;
 
+    @VariableMgr.VarAttr(name = INSERT_TIMEOUT)
+    public int insertTimeoutS = 3000;

Review Comment:
   roger that



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1095824933


##########
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:
   I was negligent, INSERT does need a different log msg. I'll modify it.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement-WIP](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1093328947


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -285,6 +286,9 @@ public class SessionVariable implements Serializable, Writable {
     @VariableMgr.VarAttr(name = QUERY_TIMEOUT)
     public int queryTimeoutS = 300;
 
+    @VariableMgr.VarAttr(name = INSERT_TIMEOUT)
+    public int insertTimeoutS = 3000;

Review Comment:
   14400s (4h)  might be better, which is in line with broker load timeout (broker_load_default_timeout_second)



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1418560682

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413096063

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1095771502


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

Review Comment:
   Should it be max(InsertTimeout, QueryTimeout) ?



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413054666

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1101506496


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1562,8 +1566,9 @@ private void handleInsertStmt() throws Exception {
                 QeProcessorImpl.INSTANCE.registerQuery(context.queryId(), coord);
 
                 coord.exec();
-
-                boolean notTimeout = coord.join(context.getSessionVariable().getQueryTimeoutS());
+                int execTimeout = context.getExecTimeout();
+                LOG.info("Insert execution timeout:{}", execTimeout);

Review Comment:
   OK, I'll modify it.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413075703

   > `SET-VARIABLE.md` and `variables.md` in docs should also be updated.
   
   OK


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1094020298


##########
docs/en/docs/advanced/variables.md:
##########
@@ -76,6 +76,7 @@ Variables that support both session-level and global-level setting include:
 * `allow_partition_column_nullable`
 * `insert_visible_timeout_ms`
 * `enable_fold_constant_by_be`
+* `insert_timeout`

Review Comment:
   line 361 also need update. You can search with keyword "insert" and "query_timeout" in docs folder and check
   description consistency.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1422135560

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dataroaring commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring commented on code in PR #16343:
URL: https://github.com/apache/doris/pull/16343#discussion_r1101211587


##########
be/src/runtime/runtime_state.cpp:
##########
@@ -21,7 +21,9 @@
 #include "runtime/runtime_state.h"
 
 #include <fmt/format.h>
+#include <gen_cpp/PaloInternalService_types.h>
 
+#include <algorithm>

Review Comment:
   uselss include?



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1562,8 +1566,9 @@ private void handleInsertStmt() throws Exception {
                 QeProcessorImpl.INSTANCE.registerQuery(context.queryId(), coord);
 
                 coord.exec();
-
-                boolean notTimeout = coord.join(context.getSessionVariable().getQueryTimeoutS());
+                int execTimeout = context.getExecTimeout();
+                LOG.info("Insert execution timeout:{}", execTimeout);

Review Comment:
   info -> debug.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -577,25 +581,27 @@ public void checkTimeout(long now) {
                 killConnection = true;
             }
         } else {
+            long timeout;
+            String timeoutTag = "query";
             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 * 1000L;
             } else {
-                // default use session query_timeout
-                if (delta > sessionVariable.getQueryTimeoutS() * 1000) {
-                    LOG.warn("kill query timeout, remote: {}, query timeout: {}",
-                            getMysqlChannel().getRemoteHostPortString(), sessionVariable.getQueryTimeoutS());
+                //to ms
+                timeout = executionTimeoutS * 1000L;
+            }
+            //deal with insert stmt particularly
+            if (executor != null && executor.isInsertStmt()) {
+                timeoutTag = "insert";
+            }
 
-                    // Only kill
-                    killFlag = true;
-                }
+            if (delta > timeout) {
+                LOG.warn("kill {} timeout, remote: {}, query timeout: {}",
+                        timeoutTag, getMysqlChannel().getRemoteHostPortString(), timeout);
+                killFlag = true;
             }
         }
+

Review Comment:
   executionTimeoutS is set in setExecTimeout, we can just use it ?```suggestion
   
   ```



##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -19,9 +19,11 @@
 
 #include <bvar/latency_recorder.h>
 #include <gen_cpp/HeartbeatService_types.h>
+#include <glog/logging.h>
 #include <gperftools/profiler.h>
 #include <thrift/protocol/TDebugProtocol.h>
 
+#include <algorithm>

Review Comment:
   useless includes.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425328153

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1422666862

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dataroaring merged pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #16343:
URL: https://github.com/apache/doris/pull/16343


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1413197567

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425311686

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423838054

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423497189

   > 
   
   Recieved, will be done later.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1420947685

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1422032733

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423719835

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423741676

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1423841541

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425130649

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425429823

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1425605047

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] hello-stephen commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1412786307

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.02 seconds
    load time: 492 seconds
    storage size: 17123166123 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230201215320_clickbench_pr_89045.html


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16343:
URL: https://github.com/apache/doris/pull/16343#issuecomment-1414781285

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] freemandealer commented on a diff in pull request #16343: [Enhancement](Stmt) Set insert_into timeout session variable separately

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org