From afd71d7b18402b893e619926bd47ce9c68879df1 Mon Sep 17 00:00:00 2001 From: Refrain Date: Thu, 22 Oct 2026 13:22:45 +0800 Subject: [PATCH] [fix](regression) Fix flaky materialized view load-open test (#67138) `test_materialized_view_load_open` used `createMV`, which waits for the latest materialized view job in the shared database. Under parallel suite execution, it can observe a concurrent job as `FINISHED` and execute `ADD COLUMN` while its own table is still in `ROLLUP` state. Replace all four calls with `create_sync_mv` so each materialized view creation waits for the job belonging to its base table. --- .../rollup_p0/test_materialized_view_load_open.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regression-test/suites/rollup_p0/test_materialized_view_load_open.groovy b/regression-test/suites/rollup_p0/test_materialized_view_load_open.groovy index 1a2fdf0d278954..9aa156136959e1 100644 --- a/regression-test/suites/rollup_p0/test_materialized_view_load_open.groovy +++ b/regression-test/suites/rollup_p0/test_materialized_view_load_open.groovy @@ -128,10 +128,10 @@ suite("test_materialized_view_load_open", "rollup") { ); """ - createMV("CREATE materialized VIEW test_load_open AS SELECT k1 as a1 FROM ${tbName1} GROUP BY k1;") - createMV("CREATE materialized VIEW test_load_open_dynamic_partition AS SELECT k1 as a2 FROM ${tbName2} GROUP BY k1;") - createMV("CREATE materialized VIEW test_load_open_schema_change AS SELECT k1 as a3 FROM ${tbName3} GROUP BY k1;") - createMV("CREATE materialized VIEW test_load_open_dynamic_partition_schema_change AS SELECT k1 as a4 FROM ${tbName4} GROUP BY k1;") + create_sync_mv(context.dbName, tbName1, "test_load_open", "SELECT k1 as a1 FROM ${tbName1} GROUP BY k1;") + create_sync_mv(context.dbName, tbName2, "test_load_open_dynamic_partition", "SELECT k1 as a2 FROM ${tbName2} GROUP BY k1;") + create_sync_mv(context.dbName, tbName3, "test_load_open_schema_change", "SELECT k1 as a3 FROM ${tbName3} GROUP BY k1;") + create_sync_mv(context.dbName, tbName4, "test_load_open_dynamic_partition_schema_change", "SELECT k1 as a4 FROM ${tbName4} GROUP BY k1;") sql "insert into ${tbName1} values('2000-05-20', 1.5, 'test', 1);" sql "insert into ${tbName1} values('2010-05-20', 1.5, 'test', 1);" @@ -157,4 +157,4 @@ suite("test_materialized_view_load_open", "rollup") { } qt_select "select * from test_materialized_view_load_open_schema_change order by 1,2,3,4;" -} \ No newline at end of file +}