[
https://issues.apache.org/jira/browse/SOLR-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417453#comment-15417453
]
Alan Woodward commented on SOLR-9405:
-------------------------------------
bq. That doesn't necessarily mean that it is synchronized
Hm, I disagree here - if something is performed atomically, it necessarily
implies that it's synchronized, doesn't it? And the actual JVM implementation
certainly uses synchronized blocks under the hood.
canBeRemoved() is also only ever called from inside a compute() method call, so
we should be thread-safe here as well.
If we want to be totally safe, though, it should be possible to add a lock
Object to CollectionWatch and synchronize on that inside the compute() blocks
each time - I'll try it out.
> 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]