jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2503) inconsistent session and persistent state after ReferentialIntegrityException
Date Fri, 08 Jul 2011 12:08:16 GMT

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

Julian Reschke commented on JCR-2503:
-------------------------------------

I don't believe this is fully fixed; while investigating JCR-3016 we came across NodeImplTest.testReferentialIntegrityCorruption().

After the succesful save() the test case tries various operations on P3, but it does not try
nodeP3.getPath(). Adding this:

        try {
        	String expectedPath = root.getPath() + "/P3";
            assertEquals(expectedPath, nodeP3.getPath());
        } catch (Exception e) {
        	e.printStackTrace();
            String msg =
                "JCR-2503: Getting path of P3. Corrupt session?";
            log.error(msg, e);
            fail(msg);
        }

makes the test fail with 

javax.jcr.InvalidItemStateException: Item does not exist anymore: ba3ef1ac-fc5a-4e03-b44b-031f5e75c537
	at org.apache.jackrabbit.core.ItemImpl.itemSanityCheck(ItemImpl.java:116)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:90)
	at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:376)
	at org.apache.jackrabbit.core.NodeImplTest.testReferentialIntegrityCorruption(NodeImplTest.java:308)

(this in 2.2.4)

>  inconsistent session and persistent state after ReferentialIntegrityException
> ------------------------------------------------------------------------------
>
>                 Key: JCR-2503
>                 URL: https://issues.apache.org/jira/browse/JCR-2503
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.2, 2.1.0
>         Environment: win7  / jdk 1.6.0_17 / mvn 2.0.10
>            Reporter: Bram de Kruijff
>            Assignee: Jukka Zitting
>            Priority: Critical
>             Fix For: 1.6.2, 2.2.0
>
>         Attachments: CorruptionTest.java, JCR-2503.patch, JR-inconsistencies-1.5.txt
>
>
> When a ReferentialIntegrityException occurs in a session it seems that subsequent actions
on that session may result in a inconsistent session state AND even inconsistent persistent
state. The latter will even make jackrabbit fail to bootstrap an index from that persistent
state.
> Typical rootcause:
> Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: ddb9d3ea-59c1-4eb4-a83e-332f646d4f40
>         at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:270)
>         at org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1082)
>         at org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1088)
>         at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:395)
> Bootstrap failure:
> java.io.IOException: Error indexing workspace
>         at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:402)
>         at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:465)
>         at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:59)
>         at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:553)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message