[ https://issues.apache.org/jira/browse/RATIS-857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
runzhiwang updated RATIS-857: ----------------------------- Attachment: (was: RATIS-881.001.patch) > Thread unsafe RaftServerMetrics::metricsMap HashMap in multi thread > ------------------------------------------------------------------- > > Key: RATIS-857 > URL: https://issues.apache.org/jira/browse/RATIS-857 > Project: Ratis > Issue Type: Bug > Components: metrics > Reporter: runzhiwang > Assignee: runzhiwang > Priority: Major > Fix For: 0.6.0 > > Attachments: RATIS-857.001.patch > > > *What's the problem ?* > The {color:#DE350B}static{color} variable > [RaftServerMetrics::metricsMap|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerMetrics.java#L71] > is type of HashMap, which is not thread safe. But entry will be > [put|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerMetrics.java#L76] > into metricsMap by different thread, when create each RaftServerImpl > instance. -- This message was sent by Atlassian Jira (v8.3.4#803005)