[
https://issues.apache.org/jira/browse/JCR-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173486#comment-14173486
]
Marcel Reutegger commented on JCR-3823:
---------------------------------------
bq. EventResult does not properly establish a memory barrier for the shared
events instance. I suggest we either make that field volatile or synchronize
access to it.
In my view, access to the events instance is correct because it is guarded by
the sync mutex. Calling acquire and attempt in two different theads establishes
a happens-before relation. The JavaDoc of the class does not mention it, but
I'm pretty confident the memory consistency effects are the same as the
equivalent
[Semaphore|http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Semaphore.html]
in the JDK.
> Observation tests sporadically fail
> -----------------------------------
>
> Key: JCR-3823
> URL: https://issues.apache.org/jira/browse/JCR-3823
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-tests
> Environment: http://ci.apache.org/builders/oak-trunk-win7
> Reporter: Michael Dürig
> Assignee: Michael Dürig
>
> Observation tests sometimes fail on
> http://ci.apache.org/builders/oak-trunk-win7. The reason seems to be that
> {{org.apache.jackrabbit.test.api.observation.EventResult}} does not properly
> establish a memory barrier for the shared {{events}} instance. I suggest we
> either make that field volatile or synchronize access to it.
> See also OAK-2165
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)