Skip to content

Commit

Permalink
[improve][metadataStore] Update namespace policies would cause metada…
Browse files Browse the repository at this point in the history
…ta-store thread waiting too long (apache#16438)
  • Loading branch information
gaozhangmin authored and weimob-wuxuanqi committed Jul 14, 2022
1 parent 8774165 commit d77708d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ private void handleMetadataChanges(Notification n) {

private void handleLocalPoliciesUpdates(NamespaceName namespace) {
pulsar.getPulsarResources().getLocalPolicies().getLocalPoliciesAsync(namespace)
.thenAccept(optLocalPolicies -> {
.thenAcceptAsync(optLocalPolicies -> {
if (!optLocalPolicies.isPresent()) {
return;
}
Expand All @@ -2028,12 +2028,12 @@ private void handleLocalPoliciesUpdates(NamespaceName namespace) {
});
}
});
});
}, pulsar.getExecutor());
}

private void handlePoliciesUpdates(NamespaceName namespace) {
pulsar.getPulsarResources().getNamespaceResources().getPoliciesAsync(namespace)
.thenAccept(optPolicies -> {
.thenAcceptAsync(optPolicies -> {
if (!optPolicies.isPresent()) {
return;
}
Expand All @@ -2058,7 +2058,7 @@ private void handlePoliciesUpdates(NamespaceName namespace) {
// 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() {
Expand Down

0 comments on commit d77708d

Please sign in to comment.