Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -902,16 +902,18 @@ private CompletableFuture<Void> filterAndUnloadMatchedNamespaceAsync(String clus
List<CompletableFuture<Void>> futures = clusterLocalNamespaces.stream()
.map(namespaceName -> adminClient.namespaces().unloadAsync(namespaceName))
.collect(Collectors.toList());
return FutureUtil.waitForAll(futures).thenAccept(__ -> {
return FutureUtil.waitForAll(futures).thenAcceptAsync(__ -> {
try {
// write load info to load manager to make the load happens fast
// Write the load report so the unloaded namespaces rebalance quickly. Run it on the
// broker executor rather than the admin-client callback thread that completes the
// unload futures, because writeLoadReportOnZookeeper blocks on a metadata-store write.
pulsar().getLoadManager().get().writeLoadReportOnZookeeper(true);
} catch (Exception e) {
log.warn()
.exception(e)
.log("Failed to writeLoadReportOnZookeeper.");
}
});
}, pulsar().getExecutor());
});
}

Expand Down
Loading