dielhennr commented on a change in pull request #11141: URL: https://github.com/apache/kafka/pull/11141#discussion_r694355602
########## File path: core/src/main/scala/kafka/server/KafkaApis.scala ########## @@ -2599,36 +2600,97 @@ class KafkaApis(val requestChannel: RequestChannel, } def handleAlterConfigsRequest(request: RequestChannel.Request): Unit = { - val zkSupport = metadataSupport.requireZkOrThrow(KafkaApis.shouldAlwaysForward(request)) val alterConfigsRequest = request.body[AlterConfigsRequest] - val (authorizedResources, unauthorizedResources) = alterConfigsRequest.configs.asScala.toMap.partition { case (resource, _) => - resource.`type` match { - case ConfigResource.Type.BROKER_LOGGER => - throw new InvalidRequestException(s"AlterConfigs is deprecated and does not support the resource type ${ConfigResource.Type.BROKER_LOGGER}") - case ConfigResource.Type.BROKER => - authHelper.authorize(request.context, ALTER_CONFIGS, CLUSTER, CLUSTER_NAME) - case ConfigResource.Type.TOPIC => - authHelper.authorize(request.context, ALTER_CONFIGS, TOPIC, resource.name) - case rt => throw new InvalidRequestException(s"Unexpected resource type $rt") + if (config.requiresZookeeper) { + val zkSupport = metadataSupport.requireZkOrThrow(KafkaApis.shouldAlwaysForward(request)) + if (!request.isForwarded && isForwardingEnabled(request) && !zkSupport.controller.isActive) { Review comment: {`alter`, `incrementalAlter`}`Configs` behavior for Zk brokers has not changed with this PR. This conditional to forward the request is only here to get tests to pass but since forwarding isn't enabled for ZK brokers yet the request will never be forwarded in practice. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org