[ 
https://issues.apache.org/jira/browse/OAK-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Reutegger updated OAK-1397:
----------------------------------

    Attachment: OAK-1397.patch

Updated the patch. Now it applies cleanly again.

The jcr:predecessors property is actually correct and must not be modified. The 
issue is with the test. It tries to remove a version, which is still referenced 
by the versionable node. The version is the base version of the versionable 
test node and once checked out this is also reflected in the jcr:predecessors 
property. I changed the test in the updated patch and now it performs an 
additional checkin to really decouple the versionable node from the version.

However, the test still fails. The ReferenceEditor complains about references 
to the version node the test is trying to remove.

This is how the check looks like:

{noformat}
            Set<String> offending = newHashSet(rmIds);
            offending.removeAll(rmRefs.keySet());
            offending.removeAll(newIds);
            if (!offending.isEmpty()) {
                throw new CommitFailedException(INTEGRITY, 1,
                        "Unable to delete referenced node");
            }
            rmIds.addAll(discardedIds);
{noformat}

The offending set contains the id of the version node to remove.The 
discardedIds contains the id as well, but it is not taken into account. What 
exactly is the purpose of discardedIds?

> VersionHistory#removeVersion
> ----------------------------
>
>                 Key: OAK-1397
>                 URL: https://issues.apache.org/jira/browse/OAK-1397
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: jcr
>            Reporter: angela
>            Assignee: Marcel Reutegger
>             Fix For: 0.18
>
>         Attachments: OAK-1397.patch, OAK-1397_initial_work.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to