m1a2st commented on code in PR #21579:
URL: https://github.com/apache/kafka/pull/21579#discussion_r3311230684


##########
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:
   Thanks! I went with guarding the WARN and reused the existing 
`isLeavingGroup()` helper method. 



-- 
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]

Reply via email to