From 6a632aecc831e13d60598dcdcb0a61898eaed623 Mon Sep 17 00:00:00 2001 From: Penghui Li Date: Sun, 2 Oct 2022 08:46:09 +0800 Subject: [PATCH] [fix][broker] Fix the broker shutdown issue after Zookeeper node crashed (#17909) (cherry picked from commit e26060a1e15a3488fc93cdff6bb0e95e7ec52fed) --- .../java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java index ad23faea25e27..4e488df478f76 100644 --- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java +++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java @@ -98,7 +98,7 @@ public ZKMetadataStore(String metadataURL, MetadataStoreConfig metadataStoreConf .sessionTimeoutMs(metadataStoreConfig.getSessionTimeoutMillis()) .watchers(Collections.singleton(event -> { if (sessionWatcher != null) { - sessionWatcher.ifPresent(sw -> sw.process(event)); + sessionWatcher.ifPresent(sw -> executor.execute(() -> sw.process(event))); } })) .build();