lianetm commented on code in PR #15698: URL: https://github.com/apache/kafka/pull/15698#discussion_r1565815246
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java: ########## @@ -482,6 +484,14 @@ public long nextHeartbeatMs(final long currentTimeMs) { return heartbeatTimer.remainingMs(); } + public void onFailedAttempt(final long currentTimeMs) { + // Expire timer to allow sending HB after a failure. After a failure, a next HB may be + // needed with backoff (ex. errors that lead to retries, like coordinator load error), + // or immediately (ex. errors that lead to rejoining, like fencing errors). + heartbeatTimer.update(heartbeatTimer.currentTimeMs() + heartbeatTimer.remainingMs()); Review Comment: Done, good point. I changed it to reset to 0, that shows the intention of not having an interval to wait for, which is what we want on these failure scenarios. -- 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