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/07/13 06:33:07 UTC
[pulsar] branch master updated: [improve][metadataStore] Update namespace policies would cause metadata-store thread waiting too long (#16438)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new a19ed1a46a1 [improve][metadataStore] Update namespace policies would cause metadata-store thread waiting too long (#16438)
a19ed1a46a1 is described below
commit a19ed1a46a111d376ba2fd7a85ff314605250273
Author: gaozhangmin <ga...@qq.com>
AuthorDate: Wed Jul 13 14:32:58 2022 +0800
[improve][metadataStore] Update namespace policies would cause metadata-store thread waiting too long (#16438)
---
.../main/java/org/apache/pulsar/broker/service/BrokerService.java | 8 ++++----
1 file changed, 4 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 5e78417260b..abeec85eb84 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
@@ -2005,7 +2005,7 @@ public class BrokerService implements Closeable {
private void handleLocalPoliciesUpdates(NamespaceName namespace) {
pulsar.getPulsarResources().getLocalPolicies().getLocalPoliciesAsync(namespace)
- .thenAccept(optLocalPolicies -> {
+ .thenAcceptAsync(optLocalPolicies -> {
if (!optLocalPolicies.isPresent()) {
return;
}
@@ -2028,12 +2028,12 @@ public class BrokerService implements Closeable {
});
}
});
- });
+ }, pulsar.getExecutor());
}
private void handlePoliciesUpdates(NamespaceName namespace) {
pulsar.getPulsarResources().getNamespaceResources().getPoliciesAsync(namespace)
- .thenAccept(optPolicies -> {
+ .thenAcceptAsync(optPolicies -> {
if (!optPolicies.isPresent()) {
return;
}
@@ -2058,7 +2058,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() {