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


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -353,7 +353,7 @@ public ControllerResult<BrokerRegistrationReply> 
registerBroker(
         if (existing != null) {
             prevIncarnationId = existing.incarnationId();
             storedBrokerEpoch = existing.epoch();
-            if (heartbeatManager.hasValidSession(brokerId, existing.epoch())) {
+            if (heartbeatManager.hasValidSession(brokerId, existing.epoch()) 
&& !existing.fenced() && !existing.inControlledShutdown()) {
                 if (!request.incarnationId().equals(prevIncarnationId)) {
                     throw new DuplicateBrokerRegistrationException("Another 
broker is " +
                         "registered with that broker id.");

Review Comment:
   @cmccabe based on your offline comments - what if we keep the original 
behavior but just change this exception message to be more clear?
   
   e.g.
   ```
   "Another broker is registered with that broker id. This is benign if the 
broker was recently restarted, and will self-resolve shortly once the heartbeat 
manager expires the broker's session."
   ```



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

Reply via email to