lianetm commented on code in PR #15698: URL: https://github.com/apache/kafka/pull/15698#discussion_r1565783934
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java: ########## @@ -269,6 +269,9 @@ private NetworkClientDelegate.UnsentRequest makeHeartbeatRequest(final long curr heartbeatRequestState.onSendAttempt(currentTimeMs); membershipManager.onHeartbeatRequestSent(); metricsManager.recordHeartbeatSentMs(currentTimeMs); + // Reset timer when sending the request, to make sure that, if waiting for the interval, + // we don't include the response time (which may introduce delay) Review Comment: You're right, I don't think it's bringing anything not clear with the func name and action themselves. Removed. This is covered in the new test I added [here](https://github.com/apache/kafka/blob/fe483ff816b62133291f77f29b00e3bc706b581f/clients/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java#L258). I just included now an assert message along the lines of this comment to make it clearer in the test. -- 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