[ 
http://issues.apache.org/jira/browse/JCR-414?page=comments#action_12377219 ] 

Tobias Bocanegra commented on JCR-414:
--------------------------------------

i modified the versionmanager behaviour a little. the jcr:successor virtual 
property is not longer virtual but is also persisted in the version persistence 
manager.

unfortunately, this does not fix this issue at all. it is a fundamental 
problem, that modifications to the version store within a transaction are not 
'seen' from the session using that transaction. i also added a new testcase 
that finds this problem.

(v1 is a version from session 1, v2 the same version from session 2)
 
 OK: V1, name=jcr:rootVersion, succ=0
 OK: V2, name=jcr:rootVersion, succ=0
---------checkout/checkin n1 (uncommitted)----------
ERR: V1, name=jcr:rootVersion, succ=0 != 1
 OK: V2, name=jcr:rootVersion, succ=0
 OK: V1, name=1.0, succ=0
--------checkout/checkin n1 (comitted)----------
 OK: V1, name=jcr:rootVersion, succ=1
 OK: V2, name=jcr:rootVersion, succ=1
 OK: V1, name=1.0, succ=0

As you can see, the number of successors is only correct after the commit. the 
same happens for 'RemoveVersion'.

this probably needs a more thorough change to the code.

> jcr:successors property not persisted correctly within a transaction
> --------------------------------------------------------------------
>
>          Key: JCR-414
>          URL: http://issues.apache.org/jira/browse/JCR-414
>      Project: Jackrabbit
>         Type: Bug

>   Components: versioning
>     Versions: 1.0
>  Environment: Java 5.0. 
>     Reporter: Nicolas Belisle
>  Attachments: PropertyTest.java, VersionHistoryTest.java
>
> During a transaction, if you create a new version then read the version 
> history the "jcr:successors" property is not updated. Note that 
> "jcr:predecessors" is updated properly.
> Also, the version history is sometimes not propertly read. During the 
> transaction, it might appear empty. This behavior in not consistent from one 
> execution to another.
> After a restart of the repository, the version history and the 
> "jcr:successors" property is read properly.
> * Tests cases will follow shortly.
> Thanks, 
> Nicolas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to