[
https://issues.apache.org/jira/browse/SOLR-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417688#comment-15417688
]
Shalin Shekhar Mangar commented on SOLR-9405:
---------------------------------------------
bq. Hm, I disagree here - if something is performed atomically, it necessarily
implies that it's synchronized, doesn't it?
A method which calls compare and set is atomic but doesn't necessarily
synchronize.
bq. And the actual JVM implementation certainly uses synchronized blocks under
the hood.
I'm not very familiar with the new collection methods such as compute and that
is why I asked if this is really synchronized. All I am saying is that the
Javadocs don't explicitly say that it is synchronized and therefore we should
be vary of relying on such behaviour. It is possible that my understanding is
wrong but I'd still like to understand why if you can help. If you are
confident that the current code is correct, a code comment on stateWatchers
stating why and how it must be used in future would be nice to have.
> 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]