kirktrue commented on code in PR #16031: URL: https://github.com/apache/kafka/pull/16031#discussion_r1624804702
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java: ########## @@ -827,26 +808,15 @@ abstract class RetriableRequestState extends RequestState { */ abstract CompletableFuture<?> future(); - /** - * Complete the request future with a TimeoutException if the request timeout has been - * reached, based on the provided current time. - */ - void maybeExpire(long currentTimeMs) { - if (retryTimeoutExpired(currentTimeMs)) { - removeRequest(); - isExpired = true; - future().completeExceptionally(new TimeoutException(requestDescription() + - " could not complete before timeout expired.")); - } - } - /** * Build request with the given builder, including response handling logic. */ NetworkClientDelegate.UnsentRequest buildRequestWithResponseHandling(final AbstractRequest.Builder<?> builder) { NetworkClientDelegate.UnsentRequest request = new NetworkClientDelegate.UnsentRequest( builder, - coordinatorRequestManager.coordinator()); + coordinatorRequestManager.coordinator(), + time.timer(requestTimeoutMs) + ); request.whenComplete( (response, throwable) -> { long currentTimeMs = request.handler().completionTimeMs(); Review Comment: I don't know 🤷♂️ Every so often I think about changing it, but I generally don't include changes that are unrelated to my PR. Would you like me to change it in this PR? -- 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