chia7712 commented on code in PR #21005:
URL: https://github.com/apache/kafka/pull/21005#discussion_r2808740246
##########
core/src/main/scala/kafka/server/ConfigAdminManager.scala:
##########
@@ -112,48 +112,33 @@ class ConfigAdminManager(nodeId: Int,
})
request.resources().forEach(resource => {
if (!results.containsKey(resource)) {
- val resourceType = ConfigResource.Type.forId(resource.resourceType())
- val configResource = new ConfigResource(resourceType,
resource.resourceName())
- try {
- if (containsDuplicates(resource.configs().asScala.map(_.name()))) {
- throw new InvalidRequestException("Error due to duplicate config
keys")
- }
- val nullUpdates = new util.ArrayList[String]()
- resource.configs().forEach { config =>
- if (config.configOperation() != AlterConfigOp.OpType.DELETE.id() &&
- config.value() == null) {
- nullUpdates.add(config.name())
+ processConfigResource(
Review Comment:
> The basic issue is that only the broker has enough information to validate
some dynamic configuration changes.
It seems this concern (bypassing validation) was explicitly acknowledged in
KIP-919. I'm wondering if there are specific use cases where we need to bypass
broker validation? For example, if a broker cannot start up due to incorrect
dynamic configuration, we might want to correct the configuration via the
controller directly.
> The choice to communicate directly with the kcontroller quorum should not
be taken lightly. In some cases, this bypasses safety checks built into the
system. For example, when using an incrementalAlterConfigs operation to alter
a broker configuration, normally the configuration change will be validated on
the broker side first. However, when we send the RPC to the controller quorum
directly, this validation step does not occur, since the broker is not involved.
KIP-919: https://cwiki.apache.org/confluence/x/Owo0Dw
--
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]