[ 
https://issues.apache.org/jira/browse/HADOOP-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13643455#comment-13643455
 ] 

Liang Xie commented on HADOOP-9504:
-----------------------------------

bq. the set of puts from one thread could be partially clobbered by another 
racing thread resulting in an inconsistent map when all threads have left 
createMBeanInfo

IMHO, if we use ConcurrentHashMap, that will not happen, ConcurrentHashMap has 
a internal synchronize lock to prevent.
                
> MetricsDynamicMBeanBase has concurrency issues in createMBeanInfo
> -----------------------------------------------------------------
>
>                 Key: HADOOP-9504
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9504
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 3.0.0, 2.0.3-alpha
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>            Priority: Critical
>         Attachments: HADOOP-9504.txt, HADOOP-9504-v2.txt
>
>
> Please see HBASE-8416 for detail information.
> we need to take care of the synchronization for HashMap put(), otherwise it 
> may lead to spin loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to