hello-stephen commented on code in PR #70352:
URL: https://github.com/apache/doris/pull/70352#discussion_r4764980226
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -2248,12 +2317,19 @@ public int getAsInt() {
lightIndexChange, buildIndexChange, indexSchemaMap);
}
+ // Use a heavy job when any clause needs data conversion or an
index rebuild.
+ boolean useLightIndexChange = Config.enable_light_index_change &&
lightIndexChange
+ && !requiresHeavyChange;
Review Comment:
[P2] Preflight heavy-job conflicts before mutating column metadata
On a local table with `light_schema_change=false`,
`enable_light_index_change=true`, `bloom_filter_columns='bf'`, indexes
`idx_a(a)`/`idx_b(b)`, and an unfinished BUILD of `idx_b`, `ALTER TABLE t DROP
COLUMN bf, DROP INDEX idx_a` passes the new preflight because it only checks
`idx_a`. `processDropColumn()` then removes `bf` from the live table's
bloom-filter set. This guard now routes the statement to `createJob()`, which
rejects any unfinished index job, so the SQL fails with the original column
still present but its bloom-filter configuration removed without an edit log.
Preflight the heavy path's table-wide conflict before mutating clauses, or
defer/restore the metadata changes on failure. The existing
metadata-preservation test only covers a job on the explicitly dropped index.
--
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]