github-actions[bot] commented on code in PR #65453:
URL: https://github.com/apache/doris/pull/65453#discussion_r3594352369


##########
regression-test/suites/inverted_index_p0/index_change/test_drop_index_on_partition.groovy:
##########
@@ -76,27 +44,30 @@ suite("test_drop_index_on_partition", "inverted_index") {
 
     // create inverted index
     sql "CREATE INDEX idx_v2 ON ${tableName1}(v2) USING INVERTED"
-    wait_for_last_build_index_finish(tableName1, timeout)
+    wait_for_last_col_change_finish(tableName1, timeout)
+    run_index_change_job_and_wait(tableName1, timeout) {
+        build_index_on_table("idx_v2", tableName1)
+    }
 
     // verify index exists
     def show_idx = sql "SHOW INDEX FROM ${tableName1}"
     logger.info("show index: " + show_idx)
     assertTrue(show_idx.toString().contains("idx_v2"))
 
     // record job count before DROP
-    def job_count_before = get_build_index_job_count(tableName1)
-    logger.info("job count before drop: " + job_count_before)
+    def previous_job_ids = snapshot_build_index_job_ids(tableName1)
+    logger.info("job count before drop: " + previous_job_ids.size())
 
     // drop index on partition p1 only — should create new job(s)
     sql "DROP INDEX idx_v2 ON ${tableName1} PARTITION (p1)"
 
-    def job_count_after = get_build_index_job_count(tableName1)
-    logger.info("job count after drop: " + job_count_after)
-    assertTrue(job_count_after > job_count_before,
+    def job_ids_after = snapshot_build_index_job_ids(tableName1)

Review Comment:
   The assertion still compares total retained history, even though FE prunes 
expired finished/cancelled `IndexChangeJob`s asynchronously. If one old 
same-name row is removed between the two snapshots while this drop adds one new 
row, the total sizes remain equal and this fails despite the new job being 
present (the two-partition check below can similarly undercount). Please assert 
the size of `job_ids_after - previous_job_ids` instead; the waiter already uses 
that operation-scoped membership rule.



-- 
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