You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/09/16 13:20:17 UTC
[pulsar] branch branch-2.10 updated: [fix][broker] Fix the broker close hanged issue. (#15755) (#17689)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new 5c661b63efd [fix][broker] Fix the broker close hanged issue. (#15755) (#17689)
5c661b63efd is described below
commit 5c661b63efdfffd6af5413324ad8913ef55dbe72
Author: Jiwei Guo <te...@apache.org>
AuthorDate: Fri Sep 16 21:20:00 2022 +0800
[fix][broker] Fix the broker close hanged issue. (#15755) (#17689)
---
.../main/java/org/apache/pulsar/broker/PulsarService.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
index 5c74926495e..d50be2954eb 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
@@ -440,13 +440,6 @@ public class PulsarService implements AutoCloseable, ShutdownService {
* getConfiguration()
.getBrokerShutdownTimeoutMs())));
- // shutdown loadmanager before shutting down the broker
- executorServicesShutdown.shutdown(loadManagerExecutor);
- LoadManager loadManager = this.loadManager.get();
- if (loadManager != null) {
- loadManager.stop();
- }
-
List<CompletableFuture<Void>> asyncCloseFutures = new ArrayList<>();
if (this.brokerService != null) {
CompletableFuture<Void> brokerCloseFuture = this.brokerService.closeAsync();
@@ -481,6 +474,9 @@ public class PulsarService implements AutoCloseable, ShutdownService {
this.leaderElectionService = null;
}
+ // shutdown loadmanager before shutting down the broker
+ executorServicesShutdown.shutdown(loadManagerExecutor);
+
if (adminClient != null) {
adminClient.close();
adminClient = null;
@@ -507,7 +503,10 @@ public class PulsarService implements AutoCloseable, ShutdownService {
executorServicesShutdown.shutdown(orderedExecutor);
executorServicesShutdown.shutdown(cacheExecutor);
-
+ LoadManager loadManager = this.loadManager.get();
+ if (loadManager != null) {
+ loadManager.stop();
+ }
if (schemaRegistryService != null) {
schemaRegistryService.close();