BewareMyPower commented on code in PR #23359:
URL: https://github.com/apache/pulsar/pull/23359#discussion_r1778013492


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java:
##########
@@ -1234,6 +1234,11 @@ protected void handleBrokerRegistrationEvent(String 
broker, NotificationType typ
             handleBrokerCreationEvent(broker);
         } else if (type == NotificationType.Deleted) {
             log.info("BrokerRegistry detected the broker:{} registry has been 
deleted.", broker);
+            // The registered node is an ephemeral node that could be deleted 
when the metadata store client's session
+            // is expired. In this case, we should register again.
+            if (brokerRegistry.getBrokerId().equals(broker)) {
+                brokerRegistry.registerAsync();

Review Comment:
   It makes sense. Moved now.



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