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


##########
regression-test/plugins/plugin_index_change.groovy:
##########
@@ -23,22 +23,46 @@ import java.util.regex.Pattern;
 
 def delta_time = 1000
 
-Suite.metaClass.wait_for_last_build_index_finish = {table_name, 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}" ORDER BY CreateTime DESC LIMIT 1;"""
-        alter_res = alter_res.toString()
-        if(alter_res.contains("FINISHED")) {
-            logger.info(table_name + " latest alter job finished, detail: " + 
alter_res)
-            break
-        } else if (alter_res.contains("CANCELLED")) {
-            logger.info(table_name + " latest alter job failed, detail: " + 
alter_res)
+Suite.metaClass.get_build_index_job_ids = { table_name ->
+    def alter_res = sql """SHOW BUILD INDEX WHERE TableName = 
"${table_name}";"""
+    return alter_res.collect { it[0].toString() }.toSet()
+}
+
+Suite.metaClass.wait_for_last_build_index_finish = { table_name, OpTimeout, 
previous_job_ids = null ->
+    def finished = false
+    def alter_res = []
+    def confirmed_finished_job_ids = null
+    for (int t = 0; t <= OpTimeout; t += delta_time) {
+        if (previous_job_ids == null) {

Review Comment:
   Fixed in 773e4e26917. test_ngram_bloomfilter_index_change now snapshots 
existing JobIds before the Cloud true-mode three-partition drop and waits for 
all new delete jobs. Its schema-only and empty-table add/drop paths use only 
the shared column wait, and the duplicate local column helper with the old 
timeout-success assertion was removed.



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