You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/23 04:13:32 UTC

[GitHub] [pulsar] merlimat opened a new pull request #12146: PIP-45: Use Metadata SessionLost event to trigger broker shutdowns

merlimat opened a new pull request #12146:
URL: https://github.com/apache/pulsar/pull/12146


   ### Motivation
   
   MetadataStore has already a component that is checking the status of the session. We can then refactor the shutdown handler implementation to rely on that instead of the ZK client based implementation.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #12146: PIP-45: Use Metadata SessionLost event to trigger broker shutdowns

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #12146:
URL: https://github.com/apache/pulsar/pull/12146


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #12146: PIP-45: Use Metadata SessionLost event to trigger broker shutdowns

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #12146:
URL: https://github.com/apache/pulsar/pull/12146#discussion_r714740551



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -834,6 +822,15 @@ private void addWebServerHandlers(WebService webService,
         addBrokerAdditionalServlets(webService, attributeMap, config);
     }
 
+    private void handleMetadataSessionEvent(SessionEvent e) {
+        LOG.info("Received metadata service session event: {}", e);
+        if (e == SessionEvent.SessionLost
+                && config.getZookeeperSessionExpiredPolicy() == MetadataSessionExpiredPolicy.shutdown) {
+            LOG.warn("The session with metdata service was lost. Shutting down.");

Review comment:
       typo: metdata

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
##########
@@ -329,7 +329,11 @@ public static void main(String[] args) throws Exception {
         BrokerStarter starter = new BrokerStarter(args);
         Runtime.getRuntime().addShutdownHook(
             new Thread(() -> {

Review comment:
       what about giving a name to the thread, now that we are touching this code?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org