KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller#22104
Open
m1a2st wants to merge 5 commits intoapache:trunkfrom
Open
KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller#22104m1a2st wants to merge 5 commits intoapache:trunkfrom
m1a2st wants to merge 5 commits intoapache:trunkfrom
Conversation
chia7712
reviewed
Apr 21, 2026
| throw ee; | ||
| } | ||
| } else if (BROKER_LOGGER_CONFIG_TYPE.equals(entityType)) { | ||
| List<String> validLoggers = getResourceConfig(adminClient, entityType, entityName, true, false).stream().map(ConfigEntry::name).toList(); |
Member
There was a problem hiding this comment.
It looks like an existing bug, as the synonyms are not actually being used. Therefore, it should pass true instead of false.
| } | ||
|
|
||
| private static void alterResourceConfig(Admin adminClient, String entityTypeHead, String entityNameHead, List<String> configsToBeDeleted, Map<String, ConfigEntry> configsToBeAdded, ConfigResource.Type resourceType) throws ExecutionException, InterruptedException, TimeoutException { | ||
| Map<String, ConfigEntry> oldConfig = getResourceConfig(adminClient, entityTypeHead, entityNameHead, false, false) |
Member
There was a problem hiding this comment.
please add this changes to upgrade.md
chia7712
reviewed
Apr 21, 2026
|
|
||
| ### Notable changes in 4.4.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.
Since this fix will be backported to the 4.3 branch, this note can be deferred to the PR targeting 4.3.
Collaborator
Author
|
For 4.3 branch: #22113 |
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.
Ref #22070 (comment)
Remove the pre-flight DescribeConfigs existence check in
alterResourceConfig()since deleting a non-existent config isidempotent, and the check causes a timeout when the target broker is
offline.
Reviewers: Chia-Ping Tsai chia7712@gmail.com