You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2015/08/11 08:48:45 UTC

[jira] [Resolved] (OAK-3152) Stopping/starting a repository in quick succession can lead to index inconsistencies

     [ https://issues.apache.org/jira/browse/OAK-3152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved OAK-3152.
-----------------------------------
    Resolution: Invalid

The test does not shut down the NodeStore properly, which means
initRepo() will actually start a new cluster node and not just
restart the repository as intended.

The exception you see may happen when the next cluster node
is started quickly after the first iteration and does not yet
see the changes from the initial repository startup. Those
changes are propagated with a slight delay by the background
update thread.

If the test also keeps a reference to the DocumentNodeStore
and calls dispose() on it after the Repository is shut down,
the test will run fine.

There were also some recent discussions on the dev list about
who owns the NodeStore instance and should be responsible for
disposing it. IIRC the consensus was code passing in the NodeStore
instance to the Jcr builder should be responsible disposing
the NodeStore if necessary.

> Stopping/starting a repository in quick succession can lead to index inconsistencies
> ------------------------------------------------------------------------------------
>
>                 Key: OAK-3152
>                 URL: https://issues.apache.org/jira/browse/OAK-3152
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>    Affects Versions: 1.3.2
>            Reporter: Robert Munteanu
>            Assignee: Marcel Reutegger
>         Attachments: MultiplexingNodeStoreCurrentFailuresTest.java
>
>
> I've run into an issue in Apache Sling where locking a node fails ( with a MultiplexingDocumentStore prototype I'm working on ). Trying to reduce this to a simple test case in Oak I noticed that I can reproduce the problem with vanilla Oak as well ( oak trunk as of r1693086 ).
> As far as I can tell, the error is a variation on 
> {noformat}org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: The node 3:/oak:index/nodetype/:index was already added in revision
> r14ed4ddbeb6-0-1, before
> r14ed4ddf220-0-2{noformat}
> The error I was seeing was with locking, e.g. {noformat}The node 8:/oak:index/jcrLockOwner/:index/admin/var/sling/bundle-content/org.apache.sling.xss was already added in revision
> r14ed49f3814-0-1, before
> r14ed4a1da84-0-1{noformat}.
> I'll attach a test case which reproduces the error for me with a Mongo-based DocumentNodeStore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)