frankvicky commented on code in PR #16017:
URL: https://github.com/apache/kafka/pull/16017#discussion_r1620555264
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java:
##########
@@ -208,7 +209,11 @@ public NetworkClientDelegate.PollResult poll(long
currentTimeMs) {
return new
NetworkClientDelegate.PollResult(heartbeatRequestState.heartbeatIntervalMs,
Collections.singletonList(leaveHeartbeat));
}
- boolean heartbeatNow = membershipManager.shouldHeartbeatNow() &&
!heartbeatRequestState.requestInFlight();
+ // Case 1: The member is leaving
+ boolean heartbeatNow = membershipManager.state() ==
MemberState.LEAVING ||
+ // Case 2: The member should send a heartbeat now, and there
is no heartbeat request currently in flight
Review Comment:
Thank you, this is more precisely and clear, I will modify the comment. 😸
--
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]