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

Bart van der Schans commented on JCR-2456:
------------------------------------------

Hi Thomas,

I ran the test with IGNORE_ERRORS to true, but I added a line to print the 
stacktraces after the  System.out.println(e); in the IGNORE_ERRORS block. 

I do understand the 'real' problem and we have seen that situation on some 
production servers. But we also do have some custom code to handle virtual 
nodes which could results in a same kind of error, so I don't want to blame 
jackrabbit code unjustified ;-)

I've ported the patch to 1.5 (I guess 1.6 isn't that different for these parts 
of the code) and I don't see the NoSuchItemStateExceptions any more. It does 
hit the extra check in the EventStateCollection:

javax.jcr.RepositoryException: Unable to update item: node /: Node 
1f273949-2dda-45f3-8f30-916424a4de30 must be changed as well.: Node 
1f273949-2dda-45f3-8f30-916424a4de30 must be changed as well.
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1119)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
        at 
org.apache.jackrabbit.core.MultiThreadTest$1.run(MultiThreadTest.java:53)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jackrabbit.core.state.ItemStateException: Node 
1f273949-2dda-45f3-8f30-916424a4de30 must be changed as well.
        at 
org.apache.jackrabbit.core.observation.EventStateCollection.createEventStates(EventStateCollection.java:388)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:694)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1106)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1136)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:351)
        at 
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:356)
        at 
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
        at 
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:313)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1113)
        ... 3 more




> Repository is corrupt after concurrent changes with the same session
> --------------------------------------------------------------------
>
>                 Key: JCR-2456
>                 URL: https://issues.apache.org/jira/browse/JCR-2456
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.7
>            Reporter: Thomas Mueller
>         Attachments: patch-2456-1.5.txt, patch-2456.txt, TestMultiThread.java
>
>
> After concurrent write operations using the same session, the repository can 
> get corrupt, meaning a ItemNotFoundException is thrown when trying to remove 
> a node.
> Concurrent write operations are not supported, however I believe the 
> persistent state of the repository should not be get corrupt.
> One way to solve this problem is to synchronize on the session internally.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to