From 3ad9dce0678d601057a013c8661fbbf1efd6b243 Mon Sep 17 00:00:00 2001 From: zhangdong <493738387@qq.com> Date: Tue, 24 Sep 2024 16:04:30 +0800 Subject: [PATCH] =?UTF-8?q?[case](mtmv)=20Failed=20to=20fix=20the=20case?= =?UTF-8?q?=20of=20concurrent=20insert=20overwrite=20ex=E2=80=A6=20(#41163?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …ecution (#41125) pick: https://github.com/apache/doris/pull/41125 --- .../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 96b285ea4cad2e..7a55d4af622441 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 @@ -30,6 +30,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; " @@ -44,6 +45,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 } @@ -105,10 +107,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