You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2024/09/23 11:09:34 UTC

(doris) branch master updated: [case](mtmv) Failed to fix the case of concurrent insert overwrite execution (#41125)

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

morrysnow 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 19424d59b3a [case](mtmv) Failed to fix the case of concurrent insert overwrite execution (#41125)
19424d59b3a is described below

commit 19424d59b3af02e02a9328545adb74ead56f30e4
Author: zhangdong <49...@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-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org