You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/06/21 01:34:00 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #20625: [fix][broker] Fix get owned service units NPE

mattisonchao commented on code in PR #20625:
URL: https://github.com/apache/pulsar/pull/20625#discussion_r1236178010


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java:
##########
@@ -191,6 +191,10 @@ public class ExtensibleLoadManagerImpl implements ExtensibleLoadManager {
      * Get all the bundles that are owned by this broker.
      */
     public Set<NamespaceBundle> getOwnedServiceUnits() {
+        if (!started) {

Review Comment:
   Should we consider making this value `volatile`? Because I am not sure if `getOwnedServiceUnits` will be called by another thread. :)



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org