ntysdd commented on a change in pull request #5966: [Issue 5952] 
[pulsar-broker] fix ConcurrentModificationException while load-report 
serialization/updateLocalBrokerData 
URL: https://github.com/apache/pulsar/pull/5966#discussion_r365036270
 
 

 ##########
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/TopicStats.java
 ##########
 @@ -131,7 +136,12 @@ public TopicStats add(TopicStats stats) {
             }
         } else {
             for (String repl : stats.replication.keySet()) {
-                this.replication.get(repl).add(stats.replication.get(repl));
+                if (this.replication.get(repl) != null) {
 
 Review comment:
   @sijie These are 2 fixes for 2 issues. The ConcurrentMap change is for 
another issue. By the way, I believe the other issue is indeed a threading 
problem, but I don't know if the current fix is good enough.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to