github-actions[bot] commented on code in PR #68674:
URL: https://github.com/apache/doris/pull/68674#discussion_r4324807971
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -2671,8 +2682,18 @@ public int getAsInt() {
lightIndexChange, buildIndexChange, indexSchemaMap);
}
- if (olapTable.needRowBinlog() && !(lightSchemaChange ||
lightIndexChange)) {
- throw new DdlException("only support light schema change
operator when use table with binlog<Row>");
+ try {
+ if (Config.enable_light_index_change && lightIndexChange) {
+ checkLightIndexChangeBatch(needHeavySchemaChange,
buildIndexChange);
+ }
+ if (olapTable.needRowBinlog() && !(lightSchemaChange ||
lightIndexChange)) {
+ throw new DdlException(
+ "only support light schema change operator when
use table with binlog<Row>");
+ }
+ } catch (DdlException e) {
+ // Nothing has been published yet, undo the in-place bloom
filter update of processDropColumn.
+ olapTable.setBloomFilterInfo(bfColumnsBeforeAlter,
bfFppBeforeAlter);
Review Comment:
[P1] Preserve all live column metadata when rejecting a mixed batch
This catch restores only bloom-filter fields, but the clause loop also
mutates shared sequence-mapping lists and generated-column dependency sets. For
a local MOR UNIQUE table with `sequence_mapping.s1='c,d'` and a non-tokenized
INVERTED `idx_d(d)`, `ALTER TABLE t DROP COLUMN c, DROP INDEX idx_d` removes
`c` from the live `s1` list via `processDropSequenceMapping` (the `HashMap`
copy retains its `List` values), then the new heavy-batch guard throws. Both
`c` and `idx_d` remain, while SHOW CREATE and subsequent query planning see
`s1='d'`, with no edit log. Likewise, `DROP COLUMN g, MODIFY COLUMN vi BIGINT
NULL, DROP INDEX idx` on a table with `g INT AS (b+1)` and unrelated `vi`
leaves `g` present but erases it from `b`'s dependency set, allowing a later
drop of `b`. Validate the batch before these mutations, or stage/restore all
mutable column metadata, and add rejection tests for both mappings and
dependencies.
--
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]