This is an automated email from the ASF dual-hosted git repository. hellostephen pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new ddeec1426d5 [fix](test)Fix unstable index_change_with_cumu case (#46527)(#38733) (#46529) ddeec1426d5 is described below commit ddeec1426d597499fae9ded0f848abadd7758c5e Author: qiye <l...@selectdb.com> AuthorDate: Wed Jan 8 15:41:43 2025 +0800 [fix](test)Fix unstable index_change_with_cumu case (#46527)(#38733) (#46529) bp: #46527, #38733 --- ..._index_change_with_cumulative_compaction.groovy | 29 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/regression-test/suites/inverted_index_p0/index_change/test_index_change_with_cumulative_compaction.groovy b/regression-test/suites/inverted_index_p0/index_change/test_index_change_with_cumulative_compaction.groovy index 2693047a34b..ce12d1ede0c 100644 --- a/regression-test/suites/inverted_index_p0/index_change/test_index_change_with_cumulative_compaction.groovy +++ b/regression-test/suites/inverted_index_p0/index_change/test_index_change_with_cumulative_compaction.groovy @@ -17,7 +17,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods -suite("test_index_change_with_cumulative_compaction") { +suite("test_index_change_with_cumulative_compaction", "nonConcurrent") { def tableName = "index_change_with_cumulative_compaction_dup_keys" def timeout = 60000 @@ -40,6 +40,23 @@ suite("test_index_change_with_cumulative_compaction") { assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout") } + def trigger_compaction_with_retry = {table_name, compaction_type = "cumulative", max_retries = 10, delay_ms = 2000 -> + def retry_count = 0 + while (true) { + try { + trigger_and_wait_compaction(table_name, compaction_type) + return // Success + } catch (Exception e) { + retry_count++ + if (retry_count >= max_retries) { + throw new Exception("Failed to complete ${compaction_type} compaction after ${max_retries} attempts", e) + } + logger.warn("Compaction attempt ${retry_count} failed: ${e.getMessage()}") + Thread.sleep(delay_ms) + } + } + } + try { //BackendId,Cluster,IP,HeartbeatPort,BePort,HttpPort,BrpcPort,LastStartTime,LastHeartbeat,Alive,SystemDecommissioned,ClusterDecommissioned,TabletNum,DataUsedCapacity,AvailCapacity,TotalCapacity,UsedPct,MaxDiskUsedPct,Tag,ErrMsg,Version,Status String[][] backends = sql """ show backends; """ @@ -143,12 +160,14 @@ suite("test_index_change_with_cumulative_compaction") { wait_for_latest_op_on_table_finish(tableName, timeout) // build index - sql "build index idx_user_id on ${tableName}" - sql "build index idx_date on ${tableName}" - sql "build index idx_city on ${tableName}" + if (!isCloudMode()) { + sql "build index idx_user_id on ${tableName}" + sql "build index idx_date on ${tableName}" + sql "build index idx_city on ${tableName}" + } // trigger compactions for all tablets in ${tableName} - trigger_and_wait_compaction(tableName, "cumulative") + trigger_compaction_with_retry(tableName, "cumulative") int rowCount = 0 for (def tablet in tablets) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org