This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b79632e29b [fix](regression) Fix txn_insert execute timeout (#35801)
3b79632e29b is described below

commit 3b79632e29bbb33074f512b30901b2eded830108
Author: meiyi <[email protected]>
AuthorDate: Mon Jun 3 20:27:19 2024 +0800

    [fix](regression) Fix txn_insert execute timeout (#35801)
    
    
    1. The execute timeout is set to 5 seconds and forget to rest, which
    will make `txn_insert` execute timeout.
    2. Add a `insert overwrite` case which is not supported in txn insert.
---
 regression-test/suites/insert_p0/txn_insert.groovy | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/regression-test/suites/insert_p0/txn_insert.groovy 
b/regression-test/suites/insert_p0/txn_insert.groovy
index 52beaed95e7..d9ccd6831cf 100644
--- a/regression-test/suites/insert_p0/txn_insert.groovy
+++ b/regression-test/suites/insert_p0/txn_insert.groovy
@@ -223,13 +223,17 @@ suite("txn_insert") {
             order_qt_select21 """select * from ${table}_2"""
         }
 
-        // 6. insert select with error
+        // 6. insert select with error, insert overwrite
         if (use_nereids_planner) {
             sql """ begin; """
             test {
                 sql """ insert into ${table}_0 select * from $tableMV; """
                 exception "insert into cols should be corresponding to the 
query output"
             }
+            test {
+                sql """ insert overwrite table ${table}_1 select * from $table 
where k2 = 2.2 limit 1; """
+                exception "This is in a transaction, only insert, update, 
delete, commit, rollback is acceptable"
+            }
             sql """ insert into ${table}_1 select * from $table where k2 = 2.2 
limit 1; """
             sql """ commit; """
             sql "sync"
@@ -631,6 +635,9 @@ suite("txn_insert") {
             assertEquals("ABORTED", txn_state)
 
             // after the txn is timeout: do insert/ commit/ rollback
+            def insert_timeout = sql """show variables where variable_name = 
'insert_timeout';"""
+            def query_timeout = sql """show variables where variable_name = 
'query_timeout';"""
+            logger.info("query_timeout: ${query_timeout}, insert_timeout: 
${insert_timeout}")
             try {
                 sql "SET insert_timeout = 5"
                 sql "SET query_timeout = 5"
@@ -674,7 +681,8 @@ suite("txn_insert") {
                     assertTrue(e.getMessage().contains("transaction not 
found"))
                 }*/
             } finally {
-
+                sql "SET insert_timeout = ${insert_timeout[0][1]}"
+                sql "SET query_timeout = ${query_timeout[0][1]}"
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to