This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch branch-2.10 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit b040c45af154b10c8590e58df08e6cb8dcdddcdf Author: gaozhangmin <[email protected]> AuthorDate: Wed Jul 13 14:32:58 2022 +0800 [improve][metadataStore] Update namespace policies would cause metadata-store thread waiting too long (#16438) (cherry picked from commit a19ed1a46a111d376ba2fd7a85ff314605250273) --- .../main/java/org/apache/pulsar/broker/service/BrokerService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java index 09601033ca3..4b07087759e 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java @@ -1988,13 +1988,11 @@ public class BrokerService implements Closeable { } else if (pulsar().getPulsarResources().getDynamicConfigResources().isDynamicConfigurationPath(n.getPath())) { handleDynamicConfigurationUpdates(); } - - // Ignore unrelated notifications } private void handlePoliciesUpdates(NamespaceName namespace) { pulsar.getPulsarResources().getNamespaceResources().getPoliciesAsync(namespace) - .thenAccept(optPolicies -> { + .thenAcceptAsync(optPolicies -> { if (!optPolicies.isPresent()) { return; } @@ -2019,7 +2017,7 @@ public class BrokerService implements Closeable { // sometimes, some brokers don't receive policies-update watch and miss to remove // replication-cluster and still own the bundle. That can cause data-loss for TODO: git-issue unloadDeletedReplNamespace(policies, namespace); - }); + }, pulsar.getExecutor()); } private void handleDynamicConfigurationUpdates() {
