unknowntpo commented on code in PR #23357:
URL: https://github.com/apache/kafka/pull/23357#discussion_r4697021819


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestState.java:
##########
@@ -70,6 +70,11 @@ public void resetTimer() {
 
     public long timeToNextHeartbeatMs(final long currentTimeMs) {
         if (heartbeatTimer.isExpired()) {
+            if (requestInFlight()) {
+                // The heartbeat timer can expire while a request is in 
flight, and the backoff since the
+                // last response may already be exhausted. Wait the retry 
backoff to avoid a busy loop.
+                return retryBackoffMs();

Review Comment:
   @frankvicky Thanks, added it to both poll() Javadocs.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to