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

Shalin Shekhar Mangar commented on SOLR-9405:
---------------------------------------------

Thanks Alan. I am not sure how CollectionWatch#stateWatchers is thread-safe. Is 
it because all access to it is inside of ConcurrentHashMap#compute? The 
javadocs for compute only say that the entire method invocation is performed 
atomically. That doesn't necessarily mean that it is synchronized.

What about access to the size() method? We access it independently in the 
canBeRemoved() method. Is that likely to cause a problem?

> ConcurrentModificationException in ZkStateReader.getStateWatchers
> -----------------------------------------------------------------
>
>                 Key: SOLR-9405
>                 URL: https://issues.apache.org/jira/browse/SOLR-9405
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: 6.1
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Alan Woodward
>             Fix For: 6.2, master (7.0)
>
>         Attachments: SOLR-9405.patch
>
>
> Jenkins found this: http://jenkins.thetaphi.de/job/Lucene-Solr-6.x-Linux/1432/
> {code}
> Stack Trace:
> java.util.ConcurrentModificationException
>         at 
> __randomizedtesting.SeedInfo.seed([FA459DF725097EFF:A77E52876204E1C1]:0)
>         at 
> java.util.HashMap$HashIterator.nextNode(java.base@9-ea/HashMap.java:1489)
>         at 
> java.util.HashMap$KeyIterator.next(java.base@9-ea/HashMap.java:1513)
>         at 
> java.util.AbstractCollection.addAll(java.base@9-ea/AbstractCollection.java:351)
>         at java.util.HashSet.<init>(java.base@9-ea/HashSet.java:119)
>         at 
> org.apache.solr.common.cloud.ZkStateReader.getStateWatchers(ZkStateReader.java:1279)
>         at 
> org.apache.solr.common.cloud.TestCollectionStateWatchers.testSimpleCollectionWatch(TestCollectionStateWatchers.java:116)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to