[ https://issues.apache.org/jira/browse/SOLR-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657885#action_12657885 ]
Yonik Seeley commented on SOLR-918: ----------------------------------- bq. Is it ok to let it be a ConcurrentHashMap or should we make it a synchronized LinkedHashMap Either should be fine... new components are added so infrequently and checked so infrequently that there won't be a performance difference. If it's changed to synchronized LinkedHashMap, it should be noted in the javadoc for SolrCore.getInfoRegistry() (which is new in 1.3) that it's a synchronized Map and thus users need to synchronize during iteration. This synchronization is currently being done by all users of this API since it previously was a synchronized map (before the synchronization was mistakenly removed). If we stay with ConcurrentHashMap (and hence don't care about order), then the current synchronization while iterating should probably be removed too. > Thread safety issue in SolrCore.infoRegistry > -------------------------------------------- > > Key: SOLR-918 > URL: https://issues.apache.org/jira/browse/SOLR-918 > Project: Solr > Issue Type: Bug > Reporter: Shalin Shekhar Mangar > Assignee: Shalin Shekhar Mangar > Priority: Minor > Fix For: 1.4 > > Attachments: SOLR-918.patch > > > SolrCore.infoRegistry is used for keeping a reference to the SolrInfoMBean > objects. When JMX is disabled, it is initialized to a LinkedHashMap which is > not synchronized. > We can change this to a ConcurrentHashMap instead of a LinkedHashMap. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.