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

Michael Dürig commented on OAK-1055:
------------------------------------

Turns out there is a race condition between reporting internal events 
({{ChangeDispatche.contentChanged()}}) and polling for external events 
({{ChangeDispatcher.externalChange()}}): the new root reported by the latter 
may be older than a new root set previously through the former. This is due to 
the changes being persisted outside the lock of 
{{ChangeDispatche.contentChanged()}} and thus being visible inside 
{{ChangeDispatcher.externalChange()}}.

For the time being I think there is no harm in removing the polling for 
external events. I will open a follow up issue to track this in case we need 
it. 

> Occasional test failure in ObservationTest.observation()
> --------------------------------------------------------
>
>                 Key: OAK-1055
>                 URL: https://issues.apache.org/jira/browse/OAK-1055
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Michael Dürig
>
> The test occasionally fails with
> {code}
> Failed tests:
> observation[1](org.apache.jackrabbit.oak.jcr.observation.ObservationTest):
> Unexpected events: [EventImpl{type=8, jcrPath='/test_node/property',
> userID='oak:unknown', identifier='/test_node', info={}, date=0,
> userData=null, external=true}, EventImpl{type=16,
> jcrPath='/test_node/n1/p1', userID='oak:unknown',
> identifier='/test_node/n1', info={}, date=0, userData=null,
> external=true}, EventImpl{type=4, jcrPath='/test_node/n1/p2',
> userID='oak:unknown', identifier='/test_node/n1', info={}, date=0,
> userData=null, external=true}, EventImpl{type=2, jcrPath='/test_node/n3',
> userID='oak:unknown', identifier='/test_node/n3', info={}, date=0,
> userData=null, external=true}, EventImpl{type=8,
> jcrPath='/test_node/n3/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/n3', info={}, date=0, userData=null,
> external=true}, EventImpl{type=8, jcrPath='/test_node/n3/p3',
> userID='oak:unknown', identifier='/test_node/n3', info={}, date=0,
> userData=null, external=true}, EventImpl{type=2, jcrPath='/test_node/{4}',
> userID='oak:unknown', identifier='/test_node/{4}', info={}, date=0,
> userData=null, external=true}, EventImpl{type=8,
> jcrPath='/test_node/{4}/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/{4}', info={}, date=0, userData=null,
> external=true}, EventImpl{type=1, jcrPath='/test_node/n2',
> userID='oak:unknown', identifier='/test_node/n2', info={}, date=0,
> userData=null, external=true}, EventImpl{type=4,
> jcrPath='/test_node/n2/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/n2', info={}, date=0, userData=null,
> external=true}, EventImpl{type=4, jcrPath='/test_node/property',
> userID='oak:unknown', identifier='/test_node', info={}, date=0,
> userData=null, external=true}, EventImpl{type=16,
> jcrPath='/test_node/n1/p1', userID='oak:unknown',
> identifier='/test_node/n1', info={}, date=0, userData=null,
> external=true}, EventImpl{type=8, jcrPath='/test_node/n1/p2',
> userID='oak:unknown', identifier='/test_node/n1', info={}, date=0,
> userData=null, external=true}, EventImpl{type=2, jcrPath='/test_node/n2',
> userID='oak:unknown', identifier='/test_node/n2', info={}, date=0,
> userData=null, external=true}, EventImpl{type=8,
> jcrPath='/test_node/n2/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/n2', info={}, date=0, userData=null,
> external=true}, EventImpl{type=1, jcrPath='/test_node/n3',
> userID='oak:unknown', identifier='/test_node/n3', info={}, date=0,
> userData=null, external=true}, EventImpl{type=4,
> jcrPath='/test_node/n3/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/n3', info={}, date=0, userData=null,
> external=true}, EventImpl{type=4, jcrPath='/test_node/n3/p3',
> userID='oak:unknown', identifier='/test_node/n3', info={}, date=0,
> userData=null, external=true}, EventImpl{type=1, jcrPath='/test_node/{4}',
> userID='oak:unknown', identifier='/test_node/{4}', info={}, date=0,
> userData=null, external=true}, EventImpl{type=4,
> jcrPath='/test_node/{4}/jcr:primaryType', userID='oak:unknown',
> identifier='/test_node/{4}', info={}, date=0, userData=null,
> external=true}]
> {code}
> As [noted before | http://markmail.org/message/lk3vrrcn5edib73d]  having 
> {{external=true}} and also the event types indicate that the events are being 
> seen "in reverse" (i.e. reverse diffing of the node states involved). 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to