jsancio commented on code in PR #19668: URL: https://github.com/apache/kafka/pull/19668#discussion_r2098376753
########## raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java: ########## @@ -2771,16 +2776,17 @@ private RequestSendResult maybeSendRequest( Supplier<ApiMessage> requestSupplier ) { var requestSent = false; + final var request = requestSupplier.get(); + final var api = ApiKeys.forId(request.apiKey()); Review Comment: Yeah. In theory, this code doesn't know how expense is the RPC. In practice, I think all of the KRaft RPC are pretty cheap to create. I think we should keep the previous logic unless we have a good reason to change it. -- 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