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

gavinchou pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit eb7152a906a44309c9d13b671fa0ef62116455e1
Author: zhangdong <493738...@qq.com>
AuthorDate: Mon Sep 23 19:09:26 2024 +0800

    [case](mtmv) Failed to fix the case of concurrent insert overwrite 
execution (#41125)
    
    after PR #40558
    insert overwrite is not allowed in the same table
---
 .../test_iot_auto_detect_concurrent.groovy                 | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git 
a/regression-test/suites/insert_overwrite_p1/test_iot_auto_detect_concurrent.groovy
 
b/regression-test/suites/insert_overwrite_p1/test_iot_auto_detect_concurrent.groovy
index e796edfe5bb..0ce026fb99b 100644
--- 
a/regression-test/suites/insert_overwrite_p1/test_iot_auto_detect_concurrent.groovy
+++ 
b/regression-test/suites/insert_overwrite_p1/test_iot_auto_detect_concurrent.groovy
@@ -26,6 +26,7 @@ suite("test_iot_auto_detect_concurrent") {
     sql new 
File("""${context.file.parent}/ddl/test_iot_auto_detect_concurrent.sql""").text
 
     def success_status = true
+    def err_msg = ""
     def load_data = { range, offset, expect_success ->
         try {
             sql " use test_iot_auto_detect_concurrent; "
@@ -37,6 +38,7 @@ suite("test_iot_auto_detect_concurrent") {
                 success_status = false
                 log.info("fails one")
             }
+            err_msg = e.getMessage()
             log.info("successfully catch the failed insert")
             return
         }
@@ -98,10 +100,14 @@ suite("test_iot_auto_detect_concurrent") {
     thread6.join()
     thread7.join()
     // suppose result: Success to overwrite with a multiple of ten values
-    assertTrue(success_status)
-    qt_sql3 " select count(k0) from test_concurrent_write; "
-    qt_sql4 " select count(distinct k0) from test_concurrent_write; "
-
+    if (!success_status) {
+        // Not allowed running Insert Overwrite on same table
+        assertTrue(err_msg.contains('same table'))
+    } else {
+        // The execution was fast, resulting in no concurrent execution
+        qt_sql3 " select count(k0) from test_concurrent_write; "
+        qt_sql4 " select count(distinct k0) from test_concurrent_write; "
+    }
 
     /// with drop partition concurrently
     success_status = true


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

Reply via email to