shuke987 commented on code in PR #65453:
URL: https://github.com/apache/doris/pull/65453#discussion_r3592425895


##########
regression-test/suites/inverted_index_p0/index_change/test_drop_index_on_partition.groovy:
##########
@@ -26,29 +26,24 @@ suite("test_drop_index_on_partition", "inverted_index") {
     }
 
     def wait_for_build_index_on_partition_finish = { table_name, 
expected_job_count, OpTimeout ->
-        def useTime = 0
-        for (int t = delta_time; t <= OpTimeout; t += delta_time) {
-            def alter_res = sql """SHOW BUILD INDEX WHERE TableName = 
"${table_name}";"""
-            if (alter_res.size() < expected_job_count) {
-                useTime = t
-                sleep(delta_time)
-                continue
+        def finished = false
+        def alter_res = []
+        for (int t = 0; t <= OpTimeout; t += delta_time) {
+            alter_res = sql """SHOW BUILD INDEX WHERE TableName = 
"${table_name}";"""

Review Comment:
   Fixed in f73a0a4419a. Each successful partition-drop path now snapshots 
existing JobIds before the DDL and reuses the shared strict wait, so retained 
rows from earlier tables or runs are excluded. The local table-wide helper was 
removed.



##########
regression-test/suites/inverted_index_p0/test_create_index_2.groovy:
##########
@@ -107,10 +107,18 @@ suite("test_create_index_2", "inverted_index"){
     assertEquals(show_result[1][2], "name_idx_2")
     
     // drop index
+    def previous_job_ids = isCloudMode() ? 
get_build_index_job_ids(indexTbName1) : null
     sql "drop index name_idx_1 on ${indexTbName1}"
-    wait_for_last_build_index_finish(indexTbName1, timeout)
+    wait_for_last_col_change_finish(indexTbName1, timeout)
+    if (isCloudMode()) {
+        wait_for_last_build_index_finish(indexTbName1, timeout, 
previous_job_ids)
+        previous_job_ids = get_build_index_job_ids(indexTbName1)
+    }
     sql "drop index name_idx_2 on ${indexTbName1}"
-    wait_for_last_build_index_finish(indexTbName1, timeout)
+    wait_for_last_col_change_finish(indexTbName1, timeout)
+    if (isCloudMode()) {

Review Comment:
   Fixed in f73a0a4419a. The second INVERTED drop now snapshots existing JobIds 
in every mode and waits for the new delete jobs in both Cloud and non-Cloud 
runs. The first NGRAM_BF drop remains Cloud-only for the build-index wait.



##########
regression-test/suites/inverted_index_p0/index_change/test_index_change_on_renamed_column.groovy:
##########
@@ -101,7 +78,7 @@ suite("test_index_change_on_renamed_column") {
 
     // drop inverted index on renamed column
     sql """ alter table ${tableName} drop index idx_s; """
-    wait_for_last_build_index_finish(tableName, timeout)
+    wait_for_last_col_change_finish(tableName, timeout)

Review Comment:
   Fixed in f73a0a4419a. The renamed-column suite now snapshots JobIds and 
waits for new delete jobs for the non-Cloud INVERTED drop, while the Cloud 
false-mode path keeps only the column wait.



##########
regression-test/suites/inverted_index_p0/index_change/test_index_change_4.groovy:
##########
@@ -36,19 +36,33 @@ suite("test_index_change_4") {
                     ++finished_num;
                 }
             }
-            if (finished_num == expected_finished_num) {
+            if (!alter_res.isEmpty() && finished_num == expected_finished_num) 
{

Review Comment:
   Fixed in f73a0a4419a. The V1 explicit build now snapshots existing JobIds 
immediately before BUILD INDEX and uses the shared snapshot-filtered strict 
wait. The table drop helper also snapshots in both modes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to