From a6aaa343dca2756c95cfe0385b189ab73b5d0952 Mon Sep 17 00:00:00 2001 From: hoshinojyunn Date: Sat, 15 Aug 2026 19:04:09 +0800 Subject: [PATCH] [test](regression) Wait for index change jobs in multi-index test ### What problem does this PR solve? Issue Number: close #26985 Related PR: #xxx Problem Summary: The multi-index regression test must wait for each DROP INDEX operation before issuing the next statement or querying the table. In Local mode, index removal rewrites existing rowsets asynchronously through an index change job, so a completed column alter state can still leave old rowsets with the dropped index; wait for the build index job. In Cloud mode, this test uses a schema change job rather than a build index job, so wait for the latest column alter job to finish and restore the table to NORMAL. ### Release note None ### Check List (For Author) - Test: Regression test - regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy - Behavior changed: No - Does this need documentation: No --- .../test_single_column_multi_index1.groovy | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy b/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy index 408eb449c4ef97..8dbf863cfd7b58 100644 --- a/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy +++ b/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy @@ -161,11 +161,21 @@ suite("test_single_column_multi_index1", "p0") { runMatchQueries() sql """ DROP INDEX request_text_idx ON ${tableName}; """ - wait_for_latest_op_on_table_finish(tableName, timeout) + if (isCloudMode()) { + // Cloud uses a schema change job here; Local uses an asynchronous index change job. + wait_for_latest_op_on_table_finish(tableName, timeout) + } else { + wait_for_build_index_on_partition_finish(tableName, timeout) + } sql """ DROP INDEX request_keyword_idx ON ${tableName}; """ - wait_for_latest_op_on_table_finish(tableName, timeout) + if (isCloudMode()) { + // Cloud uses a schema change job here; Local uses an asynchronous index change job. + wait_for_latest_op_on_table_finish(tableName, timeout) + } else { + wait_for_build_index_on_partition_finish(tableName, timeout) + } runMatchQueries() } finally { } -} \ No newline at end of file +}