Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-566

Versioning bug with restore and transactions

    XMLWordPrintableJSON

Details

    Description

      This is a versioning bug in the presence of restore and transactions. It's hard to reproduce and seems memory-layout dependent.
      At the moment I only have a jython testcase, see below. This is with a svn checkout from today (442228).

      Basically the program does create a node and subnode and do some checkins, checkouts, restore, modifications, in successive transactions. Transactions are managed manually using the xaresource API, but it would be equivalent to use a UserTransaction (the sequence of xaresource calls in the end is the same).

      The program log and stack trace is:

      start 1
      node 36eca6a5-8e5d-46a8-897a-4b81734aaad4
      commit 1
      start 2
      commit 2
      start 3
      commit 3
      javax.transaction.xa.XAException
      at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138)
      at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:300)
      File "debug1.py", line 128, in doit
      File "debug1.py", line 145, in ?
      Caused by: org.apache.jackrabbit.core.TransactionException: Unable to prepare transaction.
      at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:159)
      at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:121)
      ... 22 more
      Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 36eca6a5-8e5d-46a8-897a-4b81734aaad4/

      {http://www.jcp.org/jcr/1.0}

      predecessors has been modified externally
      at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:546)
      at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:717)
      at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:151)
      ... 23 more
      javax.transaction.xa.XAException: javax.transaction.xa.XAException

      Note that the mentionned property (here, "jcr:predecessors") has changed when I was cutting down on the program size to get a simpler testcase. It's not necessarily a "system" property, and sometimes it was property of the subnode created under the main node.

      Attachments

        1. debug1.py
          4 kB
          Florent Guillaume
        2. VersionBugReplicate.tar.gz
          9.79 MB
          Diego Munguia

        Activity

          People

            tripod Tobias Bocanegra
            fguillaume Florent Guillaume
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: