cadonna commented on code in PR #15698: URL: https://github.com/apache/kafka/pull/15698#discussion_r1574708196
########## 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: Sorry, my previous comment is not correct. The `heartbeatTimer` is expired when you call `heartbeatTimer.reset(0)`. -- 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