This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 008df5fe713 branch-3.0: [fix](test)Fix unstable index_change_with_cumu
case #46527 (#46582)
008df5fe713 is described below
commit 008df5fe7137282acb55ed973f2af34c1cfd635d
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jan 9 08:30:28 2025 +0800
branch-3.0: [fix](test)Fix unstable index_change_with_cumu case #46527
(#46582)
Cherry-picked from #46527
Co-authored-by: qiye <[email protected]>
---
...est_index_change_with_cumulative_compaction.groovy | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
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 27789533420..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
@@ -40,6 +40,23 @@ suite("test_index_change_with_cumulative_compaction",
"nonConcurrent") {
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; """
@@ -150,7 +167,7 @@ suite("test_index_change_with_cumulative_compaction",
"nonConcurrent") {
}
// 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: [email protected]
For additional commands, e-mail: [email protected]