cmccabe commented on a change in pull request #10752: URL: https://github.com/apache/kafka/pull/10752#discussion_r639928477
########## File path: metadata/src/main/java/org/apache/kafka/controller/QuorumController.java ########## @@ -1199,6 +1213,22 @@ public void processBatchEndOffset(long offset) { }); } + @Override + public CompletableFuture<AllocateProducerIdsResponseData> allocateProducerIds( + AllocateProducerIdsRequestData request) { + return appendWriteEvent("allocateProducerIds", + () -> producerIdControlManager.generateNextProducerId(request.brokerId(), request.brokerEpoch())) + .thenApply(resultOrError -> { Review comment: I can see the reasoning behind doing it this way, but for all the other RPCs we've just been letting the future complete as an error, and making the caller handle it. One issue with changing the pattern, I suppose, is that not all the controller functions return an RPC data structure that allows setting an error. So let's keep the current pattern here for now, where caller has to handle the future completing exceptionally. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org