philipnee commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1309343270


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < 
this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, 
lastSentMs:  {}", lastReceivedMs, lastSentMs);
             return false;
         }
 
-        return requestBackoffExpired(currentTimeMs);
+        long remainingBackoffMs = remainingBackoffMs(currentTimeMs);
+
+        if (remainingBackoffMs <= 0) {
+            return true;
+        } else {
+            log.debug("There are {} ms remaining before another attempt can be 
sent", remainingBackoffMs);

Review Comment:
   ditto ^^



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