github-actions[bot] commented on code in PR #65453:
URL: https://github.com/apache/doris/pull/65453#discussion_r3587320249
##########
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:
The default `previous_job_ids == null` path is still reachable from
shared-plugin callers that this PR did not update. For example,
`regression-test/suites/index_p0/test_ngram_bloomfilter_index_change.groovy`
still calls `wait_for_last_build_index_finish(tableName, timeout)` directly
after NGRAM_BF add/drop waits on a three-partition table. In the schema-change
cases (`enable_add_index_for_new_data=false`, and non-cloud full-table NGRAM_BF
drops), FE does not create new `IndexChangeJob` rows, so this stricter helper
now waits until timeout on an empty `SHOW BUILD INDEX`. In the cloud true-mode
drop case, FE creates one delete job per partition, but this branch still
checks only `ORDER BY CreateTime DESC LIMIT 1`, so a latest finished row can
hide sibling jobs. Please either update the remaining direct callers to use the
snapshot/all-new-job path only when jobs are expected, or split this helper so
schema-only callers do not use the build-index wait.
--
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]