chia7712 commented on code in PR #18465:
URL: https://github.com/apache/kafka/pull/18465#discussion_r1910536102
##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -3483,19 +3456,7 @@ class KafkaApis(val requestChannel: RequestChannel,
}
def handleAllocateProducerIdsRequest(request: RequestChannel.Request): Unit
= {
- val zkSupport =
metadataSupport.requireZkOrThrow(KafkaApis.shouldNeverReceive(request))
- authHelper.authorizeClusterOperation(request, CLUSTER_ACTION)
-
- val allocateProducerIdsRequest = request.body[AllocateProducerIdsRequest]
-
- if (!zkSupport.controller.isActive)
- requestHelper.sendResponseMaybeThrottle(request, throttleTimeMs =>
- allocateProducerIdsRequest.getErrorResponse(throttleTimeMs,
Errors.NOT_CONTROLLER.exception))
- else
-
zkSupport.controller.allocateProducerIds(allocateProducerIdsRequest.data,
producerIdsResponse =>
- requestHelper.sendResponseMaybeThrottle(request, throttleTimeMs =>
- new
AllocateProducerIdsResponse(producerIdsResponse.setThrottleTimeMs(throttleTimeMs)))
- )
+ throw KafkaApis.shouldNeverReceive(request)
Review Comment:
> We can also remove the zk listener from the json files
open https://issues.apache.org/jira/browse/KAFKA-18474
--
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]