未验证 提交 651f7d57 编写于 作者: L lipenghui 提交者: GitHub

Avoid ConcurrentModificationException of LocalBrokerData. (#7729)

Fixes #7719

### Motivation

Avoid ConcurrentModificationException of LocalBrokerData. The root cause is the `updateLocalBrokerData` method in the ModularLoadManagerImpl update the `lastStats` in the LocalBrokerData to a HashMap, it should be a concurrent map.
上级 fc1f3475
......@@ -69,7 +69,7 @@ public class PulsarStats implements Closeable {
this.nsStats = new NamespaceStats();
this.clusterReplicationMetrics = new ClusterReplicationMetrics(pulsar.getConfiguration().getClusterName(),
pulsar.getConfiguration().isReplicationMetricsEnabled());
this.bundleStats = Maps.newHashMap();
this.bundleStats = Maps.newConcurrentMap();
this.tempMetricsCollection = Lists.newArrayList();
this.metricsCollection = Lists.newArrayList();
this.brokerOperabilityMetrics = new BrokerOperabilityMetrics(pulsar.getConfiguration().getClusterName(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册