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

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

Running with 2 threads with different sessions and the same node I do see the 
following error with the patch applied to 1.5:

org.apache.jackrabbit.core.state.ItemStateException: Trying to add a 
non-existing child node: b89abbae-4929-42ec-972e-4d60b51e27d1
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.checkAddedChildNode(SharedItemStateManager.java:988)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.checkAddedChildNodes(SharedItemStateManager.java:971)
        at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:575)
        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)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
        at 
org.apache.jackrabbit.core.MultiThreadTest$1.run(MultiThreadTest.java:58)
        at java.lang.Thread.run(Thread.java:619)

So it looks like the patch prevents the persistent state from getting corrupt.



> 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: 2.0-beta5
>            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