KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller#22113
Conversation
| 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 |
There was a problem hiding this comment.
Should we align the deletion behavior? Making it idempotent seems like the right way to go.
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.
There was a problem hiding this comment.
That is a good point. Would you mind opening a ticket to discuss it separately? I prefer to have consistent and idempotent deletion, but it may be out of scope of this PR.
There was a problem hiding this comment.
|
|
||
| ### 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). |
There was a problem hiding this comment.
Could you please port this change to the trunk version as well?
This reverts commit ad5b9f4.
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