stanislavkozlovski commented on code in PR #15130:
URL: https://github.com/apache/kafka/pull/15130#discussion_r1442732922


##########
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java:
##########
@@ -158,7 +158,9 @@ public Iterable<NetworkClient.InFlightRequest> 
clearAll(String node) {
 
     private Boolean hasExpiredRequest(long now, 
Deque<NetworkClient.InFlightRequest> deque) {
         for (NetworkClient.InFlightRequest request : deque) {
-            if (request.timeElapsedSinceSendMs(now) > request.requestTimeoutMs)
+            // We exclude throttle time here because we want to ensure that we 
don't expire requests while
+            // they are throttled. The request timeout should take effect only 
after the throttle time has elapsed.
+            if (request.timeElapsedSinceSendMs(now) - request.throttleTimeMs() 
> request.requestTimeoutMs)
                 return true;

Review Comment:
   probably because we attach the timeoutMs to the request?



-- 
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

Reply via email to