ahuang98 commented on code in PR #19428:
URL: https://github.com/apache/kafka/pull/19428#discussion_r2038346252


##########
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java:
##########
@@ -1625,6 +1627,9 @@ ControllerResult<BrokerHeartbeatReply> 
processBrokerHeartbeat(
                     break;
             }
         }
+        if (states.current().equals(CONTROLLED_SHUTDOWN) && 
states.next().equals(SHUTDOWN_NOW)) {
+            heartbeatManager.removeSession(new BrokerIdAndEpoch(brokerId, 
brokerEpoch));
+        }

Review Comment:
   @cmccabe this is what I was thinking, since brokers that are in 
`SHUTDOWN_NOW` state shouldn't be sending any more heartbeats



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