[
https://issues.apache.org/jira/browse/OAK-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13796851#comment-13796851
]
Michael Dürig commented on OAK-1055:
------------------------------------
At http://svn.apache.org/r1532782 I removed the {{PostCommitHook}} from being
passed as an argument to {{NodeStore}} methods. Instead the various
{{NodeStore}} implementations might implement {{Observable}} to indicate they
support being observed. The actual implementation is delegated to
{{ChangeDispatcher}} which takes care of listener (un)registration.
{{NodeStore}} implementations report changes to the underlying persistent store
by calling the respective methods on the {{ChangeDispatcher}} as follows:
{code}
NodeState root = store.getRoot();
branch.rebase();
changeDispatcher.beforeCommit(root);
try {
NodeState head = branch.getHead();
branch.merge();
changeDispatcher.localCommit(head);
} finally {
changeDispatcher.afterCommit(store.getRoot());
}
{code}
> 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
> Assignee: 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)