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_r363167827
##########
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:
I am not sure. Neither the map itself nor the class SubscriptionStats looks
thread-safe. Other fields like `publishers' are not prepared to concurrent
updates neither.
----------------------------------------------------------------
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