TaiJuWu commented on code in PR #18454: URL: https://github.com/apache/kafka/pull/18454#discussion_r1909882401
########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -2620,13 +2620,11 @@ class KafkaApis(val requestChannel: RequestChannel, } def handleCreateAcls(request: RequestChannel.Request): Unit = { - metadataSupport.requireZkOrThrow(KafkaApis.shouldAlwaysForward(request)) - aclApis.handleCreateAcls(request) + throw KafkaApis.shouldNeverReceive(request) Review Comment: You can throw exception here and keep https://github.com/apache/kafka/pull/18454#discussion_r1908160002 Here is an example https://github.com/apache/kafka/pull/18447/files Sorry, throw `throw KafkaApis.shouldAlwaysForward(request)` like @mingdaoy said. -- 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