Andrey N. Gura created IGNITE-12767:
---------------------------------------
Summary: MetricRegistryMBean is not hread safe
Key: IGNITE-12767
URL: https://issues.apache.org/jira/browse/IGNITE-12767
Project: Ignite
Issue Type: Improvement
Reporter: Andrey N. Gura
Fix For: 2.8.1
{{MetricRegistryMBean}} is not thread safe due to usage of {{histogramNames}}
instance of {{HashMap}} class. Changing {{HashMap}} to {{ConcurrentHashMap}}
will not help a lot (likely) because method
{{MetricUtils.histogramBucketNames()}} uses just {{put}} method
({{putIfAbsent}} will help I believe).
{{OpenCensusExporterSpi}} uses the same {{MetricUtils.histogramBucketNames()}}
method. But it isn't issue for this exporter because it is single threaded.
Also {{MetricUtils.histogramBucketNames()}} method is responsible for histogram
bucket's name representation. I believe that it is responsibility of metric
exporter and this method should be removed from {{MetricUtils}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)