BewareMyPower commented on code in PR #22573:
URL: https://github.com/apache/pulsar/pull/22573#discussion_r1580574803


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -926,9 +927,13 @@ public void unloadNamespaceBundlesGracefully() {
     }
 
     public void unloadNamespaceBundlesGracefully(int maxConcurrentUnload, 
boolean closeWithoutWaitingClientDisconnect) {
+        if (unloaded) {
+            return;
+        }

Review Comment:
   It's not in a critical path. Here I use a volatile field just because I 
realized shutdown could also be triggered via an admin API (see 
`BrokersBase#shutDownBrokerGracefully`). Therefore, to avoid thread-safety 
issues, I used volatile here.



-- 
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]

Reply via email to