You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/07 04:32:40 UTC

[GitHub] [pulsar] AnonHxy commented on a diff in pull request #16953: [fix][broker]Fix ConcurrentModificationException when ModularLoadManagerImpl start

AnonHxy commented on code in PR #16953:
URL: https://github.com/apache/pulsar/pull/16953#discussion_r939605574


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java:
##########
@@ -197,7 +197,7 @@ public class ModularLoadManagerImpl implements ModularLoadManager {
     private long unloadBundleCount = 0;
 
     private final Lock lock = new ReentrantLock();
-    private Set<String> knownBrokers = new HashSet<>();
+    private Set<String> knownBrokers = ConcurrentHashMap.newKeySet();

Review Comment:
   `handleDataNotification ` also has other actions, so we'd better keep it in `init` method I think @poorbarcode 



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