[
https://issues.apache.org/jira/browse/JCR-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173623#comment-14173623
]
Michael Dürig commented on JCR-3823:
------------------------------------
bq. In my view, access to the events instance is correct because it is guarded
by the sync mutex.
Right, this is also according to Java's [Memory Consistency Properties |
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/package-summary.html#MemoryVisibility].
However, I observed the same sporadic failures with
{{testRenameEventHandling}}, which also used the {{EventResult}} class. After
[refactoring |
https://github.com/apache/jackrabbit-oak/commit/98eeebc5572ae4969a78dcc57ca589345a7cda51]
using latches and synchronized access to the shared {{events}} field things
improved considerably.
> 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)