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 2022/08/16 12:37:48 UTC

[GitHub] [pulsar] poorbarcode commented on a diff in pull request #16756: [fix][broker]optimize the shutdown sequence of broker service when it close

poorbarcode commented on code in PR #16756:
URL: https://github.com/apache/pulsar/pull/16756#discussion_r946722398


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -731,6 +731,13 @@ public CompletableFuture<Void> closeAndRemoveReplicationClient(String clusterNam
     public CompletableFuture<Void> closeAsync() {
         try {
             log.info("Shutting down Pulsar Broker service");
+            log.info("Event loops shutting down gracefully...");
+            List<CompletableFuture<?>> shutdownEventLoops = new ArrayList<>();
+            shutdownEventLoops.add(shutdownEventLoopGracefully(acceptorGroup));
+            shutdownEventLoops.add(shutdownEventLoopGracefully(workerGroup));

Review Comment:
   Other close tasks rely on EventLoop. E.g. `unloadNamespaceBundlesGracefully`, I don't recommend this change.



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