lucasbru commented on code in PR #21579:
URL: https://github.com/apache/kafka/pull/21579#discussion_r3309556887
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java:
##########
@@ -384,6 +385,13 @@ public NetworkClientDelegate.PollResult poll(long
currentTimeMs) {
heartbeatState.reset();
return new
NetworkClientDelegate.PollResult(heartbeatRequestState.heartbeatIntervalMs(),
Collections.singletonList(leaveHeartbeat));
}
+ if (membershipManager.state() == MemberState.LEAVING &&
shouldSkipLeaveHeartbeat()) {
+ logger.info("Dynamic member {} skipping leave heartbeat
(operation=REMAIN_IN_GROUP). " +
+ "The broker will remove the member from the group via session
timeout.",
+ membershipManager.memberId());
+ membershipManager.onHeartbeatRequestSkipped();
Review Comment:
nit: onHeartbeatRequestSkipped() unconditionally logs a WARN about
"coordinator not known/available" — misleading here since we just logged INFO
about an intentional skip. Could we inline the transition +
maybeCompleteLeaveInProgress, or guard the WARN inside
onHeartbeatRequestSkipped?
--
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]