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

[GitHub] [doris] SaintBacchus opened a new pull request, #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   PR #16343 seprate the `query_timeout` and `insert_timeout`.
   But it only change the timeout in `handleQuery` function which only acception mysql client sql.
   The CTAS and MTMV insert job will miss these sesssion variable.
   So I move it into `handleInsert` funtion in 
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   
   run buildall
   
   


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run p1


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   
   run buildall
   
   


-- 
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] SaintBacchus commented on a diff in pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1473,7 +1473,9 @@ private void beginTxn(String dbName, String tblName) throws UserException, TExce
             InterruptedException, ExecutionException, TimeoutException {
         TransactionEntry txnEntry = context.getTxnEntry();
         TTxnParams txnConf = txnEntry.getTxnConf();
-        long timeoutSecond = ConnectContext.get().getSessionVariable().getQueryTimeoutS();
+        ConnectContext ctx = ConnectContext.get();
+        int timeoutSecond = Math.max(ctx.getSessionVariable().getInsertTimeoutS(), ctx.getExecTimeout());
+        ctx.setExecTimeout(timeoutSecond);

Review Comment:
   yes, here no need to set



-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   I think use `resetExecTimeForInsert` to do these job is better than `setExecTime` since it had called three times.


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run p1


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run arm


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run p1


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run p1


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1534,6 +1536,8 @@ private void handleInsertStmt() throws Exception {
         }
 
         analyzeVariablesInStmt(insertStmt.getQueryStmt());
+        // reset the executionTimeout corresponding with the StmtExecutor
+        context.setExecTimeout(Math.max(context.getSessionVariable().getInsertTimeoutS(), context.getExecTimeout()));

Review Comment:
   Therefore we don't need a reset here.



-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   LGTM


-- 
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] SaintBacchus commented on a diff in pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -640,12 +640,13 @@ public String getCurrentConnectedFEIp() {
         return currentConnectedFEIp;
     }
 
-    public void resetExecTimeout() {
-        if (executor != null && executor.isInsertStmt()) {
-            // particular timeout for insert stmt, we can make other particular timeout in the same way.
-            // set the execution timeout as max(insert_timeout,query_timeout) to be compatible with older versions
-            executionTimeoutS = Math.max(sessionVariable.getInsertTimeoutS(), executionTimeoutS);
-        }
+    public void setExecTimeout(int timeout) {
+        executionTimeoutS = timeout;
+    }
+
+    public long resetExecTimeoutByInsert() {

Review Comment:
   @TangSiyang2001 I think this is more clean to understand since now it only used by insert. But I keep `setExecTimeout` for future use



-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1473,7 +1473,9 @@ private void beginTxn(String dbName, String tblName) throws UserException, TExce
             InterruptedException, ExecutionException, TimeoutException {
         TransactionEntry txnEntry = context.getTxnEntry();
         TTxnParams txnConf = txnEntry.getTxnConf();
-        long timeoutSecond = ConnectContext.get().getSessionVariable().getQueryTimeoutS();
+        ConnectContext ctx = ConnectContext.get();
+        int timeoutSecond = Math.max(ctx.getSessionVariable().getInsertTimeoutS(), ctx.getExecTimeout());
+        ctx.setExecTimeout(timeoutSecond);

Review Comment:
   And just use 
   ```java
   long timeoutSecond = ConnectContext.get().getExecTimeout
   ```
   to fetch the required exec_tiemout



-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java:
##########
@@ -304,7 +304,9 @@ public void analyze(Analyzer analyzer) throws UserException {
 
         db = analyzer.getEnv().getCatalogMgr().getCatalog(tblName.getCtl()).getDbOrAnalysisException(tblName.getDb());
         // create label and begin transaction
-        long timeoutSecond = ConnectContext.get().getExecTimeout();
+        ConnectContext ctx = ConnectContext.get();
+        int timeoutSecond = Math.max(ctx.getExecTimeout(), ctx.getSessionVariable().getInsertTimeoutS());
+        ctx.setExecTimeout(timeoutSecond);

Review Comment:
   Once we call setExecTimeout here, the ConnectContext has already got the required exec_timeout.



-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -640,12 +640,13 @@ public String getCurrentConnectedFEIp() {
         return currentConnectedFEIp;
     }
 
-    public void resetExecTimeout() {
-        if (executor != null && executor.isInsertStmt()) {
-            // particular timeout for insert stmt, we can make other particular timeout in the same way.
-            // set the execution timeout as max(insert_timeout,query_timeout) to be compatible with older versions
-            executionTimeoutS = Math.max(sessionVariable.getInsertTimeoutS(), executionTimeoutS);
-        }
+    public void setExecTimeout(int timeout) {
+        executionTimeoutS = timeout;
+    }
+
+    public long resetExecTimeoutByInsert() {

Review Comment:
   OK, I aggre with you.



-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   fine @TangSiyang2001 


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run nereids


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   @TangSiyang2001 can you reviewer again? I find that the open txn also need set this timeout


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.02 seconds
    stream load tsv:          479 seconds loaded 74807831229 Bytes, about 148 MB/s
    stream load json:         38 seconds loaded 2358488459 Bytes, about 59 MB/s
    stream load orc:          69 seconds loaded 1101869774 Bytes, about 15 MB/s
    stream load parquet:          28 seconds loaded 861443392 Bytes, about 29 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230301021929_clickbench_pr_106061.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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   
   run buildall
   
   


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run fe-ut


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   Hi @SaintBacchus , just for disscussion, how about replace the ConnectContext#resetExecTimeout by
   ``` java
   public void setExecTimeout(int timeout) {
       executionTimeoutS = timeout;
   }
   ```
   And in StmtExecutor#handleInsertStmt, use
   ```java
   context.setExecTimeout(Math.max(context.getSessionVariable().getInsertTimeoutS(), context.getExecTimeoutS()));
   ```
   I think it may seem clearer.


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   @TangSiyang2001 thanks for suggestions. I had modified it.
   
   And I place the `Math.max` in the function `setExecTimeout`, how do you think about these?
   ```
       public void setExecTimeout(int timeout) {
           executionTimeoutS = Math.max(timeout, executionTimeoutS);
       }
   ```


-- 
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] SaintBacchus commented on a diff in pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1534,6 +1536,8 @@ private void handleInsertStmt() throws Exception {
         }
 
         analyzeVariablesInStmt(insertStmt.getQueryStmt());
+        // reset the executionTimeout corresponding with the StmtExecutor
+        context.setExecTimeout(Math.max(context.getSessionVariable().getInsertTimeoutS(), context.getExecTimeout()));

Review Comment:
   still need here, since hints in select will change the default insert_timeout



-- 
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] adonis0147 merged pull request #17249: [fix](MTMV) Reset insert timeout in handleInsert

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


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run buildall


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   > @TangSiyang2001 thanks for suggestions. I had modified it.
   > 
   > And I place the `Math.max` in the function `setExecTimeout`, how do you think about these?
   > 
   > ```
   >     public void setExecTimeout(int timeout) {
   >         executionTimeoutS = Math.max(timeout, executionTimeoutS);
   >     }
   > ```
   
   Thank u for adopting my idea. I just curious about that if we support a finer-grained timeout, and some stmt will require a shorter timeout than the default exec_timeout(currently query_timeout), in that case `max` policy in `setExecTimeout` may not be suitable anymore, and dragging `max` to the certain stmt will be more flexible and extensible for supporting different timeout policy. How do you think :)


-- 
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 #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   > I think use `resetExecTimeForInsert` to do these job is better than `setExecTime` since it had called three times.
   
   Sorry for late reply, you may look at my comment above. Will it be clearer than the former ways?


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run buildall


-- 
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] SaintBacchus commented on pull request #17249: [Fix](Stmt)Move reset insert timeout in handleInsert

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

   run arm


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