KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller#22113
Open
m1a2st wants to merge 2 commits intoapache:4.3from
Open
KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller#22113m1a2st wants to merge 2 commits intoapache:4.3from
m1a2st wants to merge 2 commits intoapache:4.3from
Conversation
chia7712
reviewed
Apr 22, 2026
| case BrokerLoggerConfigType => | ||
| val validLoggers = getResourceConfig(adminClient, entityTypeHead, entityNameHead, includeSynonyms = true, describeAll = false).map(_.name) | ||
| val validLoggers = getResourceConfig(adminClient, entityTypeHead, entityNameHead, includeSynonyms = false, describeAll = false).map(_.name) | ||
| // fail the command if any of the configured broker loggers do not exist |
Member
There was a problem hiding this comment.
Should we align the deletion behavior? Making it idempotent seems like the right way to go.
Collaborator
Author
There was a problem hiding this comment.
For BrokerLoggerConfigType, I removed the client-side pre-flight check for deletion so it's aligned with the other config types. However, the server-side ConfigAdminManager still validates that the logger exists when processing incrementalAlterConfigs.
|
|
||
| ### Notable changes in 4.3.0 | ||
|
|
||
| * `kafka-configs.sh --alter --delete-config` no longer requires the specified config keys to exist on the target resource. Previously, attempting to delete a non-existent config key raised an `InvalidConfigurationException`. The deletion is now a no-op when the key does not exist, which allows managing configs for offline brokers via `--bootstrap-controller`. For further details, please refer to [KAFKA-20506](https://issues.apache.org/jira/browse/KAFKA-20506). |
Member
There was a problem hiding this comment.
Could you please port this change to the trunk version as well?
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.
Remove the pre-flight DescribeConfigs existence check in
alterResourceConfig() since deleting a non-existent config is
idempotent, and the check causes a timeout when the target broker is
offline.
Reviewers: Chia-Ping Tsai chia7712@gmail.com