codelipenghui commented on a change in pull request #13571:
URL: https://github.com/apache/pulsar/pull/13571#discussion_r778546190
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -874,17 +874,18 @@ public void unloadNamespaceBundlesGracefully() {
// unload all namespace-bundles gracefully
long closeTopicsStartTime = System.nanoTime();
Set<NamespaceBundle> serviceUnits =
pulsar.getNamespaceService().getOwnedServiceUnits();
- serviceUnits.forEach(su -> {
- if (su instanceof NamespaceBundle) {
- try {
- pulsar.getNamespaceService().unloadNamespaceBundle(su,
-
pulsar.getConfiguration().getNamespaceBundleUnloadingTimeoutMs(),
TimeUnit.MILLISECONDS)
- .get();
- } catch (Exception e) {
- log.warn("Failed to unload namespace bundle {}", su,
e);
+ if (serviceUnits != null) {
Review comment:
@315157973 So it's only affecting the test right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]