[fix](fe) Route binlog format changes through validation#65484
Open
hutiefang76 wants to merge 1 commit into
Open
[fix](fe) Route binlog format changes through validation#65484hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
### What problem does this PR solve? Issue Number: close apache#65383 Related PR: None Problem Summary: ALTER TABLE changes to binlog.format were not recognized as binlog configuration updates. They fell through to the generic schema-change path and returned the ROW-binlog schema-change error before the existing immutable-format validation could run. Route binlog.format through updateBinlogConfig so the existing BinlogConfig validation returns the specific format-change error. ### Release note ALTER TABLE attempts to change binlog.format now report the immutable binlog-format error instead of the generic ROW schema-change error. - Test: Unit Test - AlterOperationsTest - SchemaChangeHandlerTest#testChangeBinlogFormatReportsBinlogError - ./build.sh --fe - Behavior changed: Yes. Only the error reported for unsupported binlog.format changes is corrected. - Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
spaces-X
reviewed
Jul 12, 2026
| || clause.getProperties().containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_BYTES) | ||
| || clause.getProperties().containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_HISTORY_NUMS)); | ||
| || clause.getProperties().containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_HISTORY_NUMS) | ||
| || clause.getProperties().containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_FORMAT)); |
Contributor
There was a problem hiding this comment.
binlog.need_historical_value seems to have the same routing gap as binlog.format. ModifyTablePropertiesOp.validate() treats it as a binlog property, and BinlogConfig.mergeFromProperties(..., false) explicitly rejects changing it, but checkBinlogConfigChange() still routes it through the generic schema-change path. Could we include PROPERTIES_BINLOG_NEED_HISTORICAL_VALUE here and add the parallel test?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #65383
Related PR: None
Problem Summary:
ALTER TABLE ... SET ('binlog.format'=...)was not recognized as a binlog configuration update. It fell through to the generic schema-change path and returned the ROW-binlog schema-change error before the existing immutable-format validation could run.This change routes
binlog.formatthroughupdateBinlogConfig(), whereBinlogConfig.mergeFromProperties(..., false)already returns the specific unsupported format-change error.Release note
Unsupported
binlog.formatchanges now report the immutable binlog-format error instead of the generic ROW schema-change error.Check List (For Author)
Test
AlterOperationsTestSchemaChangeHandlerTest#testChangeBinlogFormatReportsBinlogError./build.sh --feBehavior changed:
binlog.formatchanges is corrected.Does this need documentation?
I used AI-assisted review during development. I verified the root cause, patch, tests, and build locally.