[
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17389790#comment-17389790
]
Julian Sedding commented on OAK-8048:
-------------------------------------
I have also encountered the lack of support for removing empty and orphaned
version-histories. While the {{OrphanedVersionCleaner}} handles automatic
removal of an empty version-history upon removal of the versionable node, the
other part of the equation is missing. Removing empty, orphaned
version-histories. This ticket attempts to address this part IIUC. +1
Additionally, it would be desirable to remove any empty intermediate nodes in
the version storage hierarchy when version-histories get deleted. There are 3
levels of hierarchy with names made up of 2 hex digits each. I.e. there can be
up to 256 * 256 * 256 (aka 16'777'216) nodes of "waste". IMHO that's worth
keeping tidy.
[~mreutegg] You wrote the following (and I realise it's been over a year ago):
bq. Creating a versionable node with a UUID as recorded in the empty version
history will link the new node to the empty version history.
I haven't tried this, but do you mean to create a new node, add the
{{mix:versionable}} mixin and set its {{jcr:versionHistory}} property to
reference the orphaned version history? Save that. Aand then delete the newly
created node again to trigger the {{OrphanedVersionCleaner}}?
> VersionHistory not removed when removing node and all its versions
> ------------------------------------------------------------------
>
> Key: OAK-8048
> URL: https://issues.apache.org/jira/browse/OAK-8048
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.8.9
> Reporter: Marco Piovesana
> Assignee: Manfred Baedke
> Priority: Major
> Attachments: OAK-8048-test.diff, OAK-8048.diff, fix-OAK-8048.patch
>
>
> Hi all,
> I'm trying to delete a node and all its versions, but the version history is
> not removed. I'm doing the following steps (as described in OAK-4370 and
> JCR-134):
> # retrieve the version history
> # delete the node and save the session
> # delete all versions except for the base version
> # save the session
> The versions are all gone but the versionHistory node, and the base version
> node, are still there. Am I doing something wrong?
> The only test related to this that I found is
> {{ReadOnlyVersionManagerTest.testRemoveEmptyHistoryAfterRemovingVersionable}}.
> It does work, but uses Oak related classes and not the JCR interface.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)