[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2021-07-30 Thread Julian Sedding (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17390418#comment-17390418
 ] 

Julian Sedding commented on OAK-8048:
-

Thanks [~mreutegg]. I wrote a little test case to try this workaround (see 
[^OAK-8048-remove-version-history-workaround-test.patch]), because I was 
wondering if setting the protected {{jcr:uuid}} property would cause any 
issues. It turns out that it is important to set the {{jcr:uuid}} before adding 
the {{mix:versionable}} mixin. If these two lines are reversed, an exception is 
thrown due to {{jcr:uuid}} being protected. So I can confirm the workaround you 
suggest works.

> 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-remove-version-history-workaround-test.patch, 
> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2021-07-29 Thread Marcel Reutegger (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17389877#comment-17389877
 ] 

Marcel Reutegger commented on OAK-8048:
---

bq. 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?

[~jsedding] Yes, that's what I had in mind. Though, you won't be able to set 
the {{jcr:versionHistory}} property. It is protected and it is also not 
necessary. The implementation will automatically link the versionable node with 
the version history when the UUID of the versionable node matches the 
{{jcr:versionableUuid}} on the version history.

> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2021-07-29 Thread Julian Sedding (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2021-07-28 Thread Marco Piovesana (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17388525#comment-17388525
 ] 

Marco Piovesana commented on OAK-8048:
--

Hi guys, it this on hold or do you already have an idea of when it will be 
fixed?

thanks, Marco.

> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-10-12 Thread Manfred Baedke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17212536#comment-17212536
 ] 

Manfred Baedke commented on OAK-8048:
-

[~mreutegg],

bq. It won't clean the repository up automatically, but there is already an 
existing approach to trigger the logic in OrphanedVersionCleaner. Assuming 
there is an empty version history without a corresponding versionable node. 
Creating a versionable node with a UUID as recorded in the empty version 
history will link the new node to the empty version history. When the node is 
deleted, the OrphanedVersionCleaner will remove the empty version history as 
well.

If we applied this patch, I think we'd have to drop (or tweak) the 
OrphanedVersionCleaner, because it will try to access VersionHistories that 
have already been deleted by the patch code (e.g. 
VersionManagementTest#testRemoveVersion() would fail) and it seems redundant. 

Without the OrphanedVersionCleaner, tests will run fine.

> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-10-08 Thread Manfred Baedke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17210291#comment-17210291
 ] 

Manfred Baedke commented on OAK-8048:
-

[~mreutegg], [~reschke],

bq. ... Restore the versionable node to the root version ...

The root version holds no state and it's impossible to restore to it (not an 
implementation detail, but specified in the VersionManager API). Something like 
"a non-empty version history where the base version is the root version" 
doesn't exist. 

[~reschke]: the patch already contains a unit test. What kind of further test 
do you think of?

> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-09-07 Thread Robin Brouns (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191727#comment-17191727
 ] 

Robin Brouns commented on OAK-8048:
---

We're facing the exact same issue. I've got a lot of _nt:versionHistory_ nodes 
in our repository without any version except the _jcr:rootVersion_. There are 
no valid references anymore for the _jcr:versionableUuid_. Until now I haven't 
found a way to delete them, except by migrating the repository with oak-upgrade 
(without copying version info). Is there any progress in getting a fix for this 
issue because it will lead to a lot of unused _nt:versionHistory_ nodes in our 
repository?

> 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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17046253#comment-17046253
 ] 

Julian Reschke commented on OAK-8048:
-

I would say that this is an unexplored corner case of the spec. :)

Anyway, let's fix *this* first. So we should explore whether the code could 
cause harm; and that needs a test...

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Marcel Reutegger (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17046252#comment-17046252
 ] 

Marcel Reutegger commented on OAK-8048:
---

bq. That said, child nodes of protected nodes are protected as well, yet we 
allow removing versions.

We do, but with an API call that's specifically designed for that purpose 
(VersionManager.removeVersion()). A Node.remove() won't work, because it is a 
transient operation. Almost all version related operations are workspace 
operations that automatically persist.

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Marcel Reutegger (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17046249#comment-17046249
 ] 

Marcel Reutegger commented on OAK-8048:
---

I did not try this, but my thinking was:
- Create versionable node
- Checkpoint the versionable node
- Restore the versionable node to the root version
- Get the version history and remove the version

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17045737#comment-17045737
 ] 

Julian Reschke commented on OAK-8048:
-

{quote}I think that would violate the specification. The version history nodes 
are protected.
{quote}

 - maybe in Oak, but not requried by the spec. That said, child nodes of 
protected nodes are protected as well, yet we allow removing versions.
{quote}With the proposed patch, I'm wondering what happens when there is a 
versionable node with the root version as the base version. Wouldn't the code 
remove the version history when the last non-root version is removed?
{quote}
Funny you mention that. I tried to do that in a test, but couldn't come up with 
a way to have a non-empty version history where the base version is the root 
version. Do have something in mind how to get there?

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Marcel Reutegger (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17045608#comment-17045608
 ] 

Marcel Reutegger commented on OAK-8048:
---

bq. wouldn't it be clearer if we just allowed a remove operation on the 
VersionHistory node?

I think that would violate the specification. The version history nodes are 
protected.

bq. this (the implicit behavior) wouldn't help with cleaning up existing repos, 
right?

It won't clean the repository up automatically, but there is already an 
existing approach to trigger the logic in OrphanedVersionCleaner. Assuming 
there is an empty version history without a corresponding versionable node. 
Creating a versionable node with a UUID as recorded in the empty version 
history will link the new node to the empty version history. When the node is 
deleted, the OrphanedVersionCleaner will remove the empty version history as 
well.

With the proposed patch, I'm wondering what happens when there is a versionable 
node with the root version as the base version. Wouldn't the code remove the 
version history when the last non-root version is removed?

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-26 Thread Marcel Reutegger (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17045592#comment-17045592
 ] 

Marcel Reutegger commented on OAK-8048:
---

bq. can you do a sanity check that this tests the right thing?

Yes, the test looks good to me.

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-25 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044261#comment-17044261
 ] 

Julian Reschke commented on OAK-8048:
-

Verified that with  [^OAK-8048.diff] , all tests continue to pass (and the new 
one stops failing).

I'm still not too happy with making this implicit; wouldn't it be clearer if we 
just allowed a remove operation on the VersionHistory node? Also, this (the 
implicit behavior) wouldn't help with cleaning up existing repos, right?

[~mreutegg] - feedback appreciated.

> 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: Julian Reschke
>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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044150#comment-17044150
 ] 

Julian Reschke commented on OAK-8048:
-

Added ignored test in [r1874475|http://svn.apache.org/r1874475] - [~mreutegg], 
can you do a sanity check that this tests the right thing?

> 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: Julian Reschke
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-18 Thread Marco Piovesana (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17039741#comment-17039741
 ] 

Marco Piovesana commented on OAK-8048:
--

Sure, no problem.. thanks!

> 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
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-18 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17039725#comment-17039725
 ] 

Julian Reschke commented on OAK-8048:
-

Ah, you might be right. Sorry. I'll have a look, but it will take some time.

> 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
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-18 Thread Marco Piovesana (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17039605#comment-17039605
 ] 

Marco Piovesana commented on OAK-8048:
--

Hi Julian, yes I did. With the fix I proposed that test passes, so I thought it 
was another test case that had to be added to validate the patch, and that I 
had to wait until approval. Am I misunderstood your comment?

> 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
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-18 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17039059#comment-17039059
 ] 

Julian Reschke commented on OAK-8048:
-

Did you have a look at 
https://issues.apache.org/jira/browse/OAK-8048?focusedCommentId=16833684=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16833684
 ?

> 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
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2020-02-17 Thread Marco Piovesana (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17038840#comment-17038840
 ] 

Marco Piovesana commented on OAK-8048:
--

Hi guys,
I know you might all very busy, but it's been a while since I've submitted the 
patch and I was wondering if it was going to be considered for any of the 
future releases. I have use cases where users create big versioned files that 
are useful only for a specific amount of time. Those files are deleted, but 
because of this bug, their base version remains there filling up the disk with 
unnecessary information.

> 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
>Priority: Major
> Attachments: OAK-8048-test.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)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-05-06 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16833684#comment-16833684
 ] 

Julian Reschke commented on OAK-8048:
-

 [^OAK-8048-test.diff]  - failing unit test

> 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
>Priority: Major
> Attachments: OAK-8048-test.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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-04-23 Thread Marco Piovesana (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16823911#comment-16823911
 ] 

Marco Piovesana commented on OAK-8048:
--

Yes Julian, my bad I meant JCR-134 and not JCR-34.

 

Marco.

> 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
>Priority: Major
> Attachments: 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-04-23 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16823821#comment-16823821
 ] 

Julian Reschke commented on OAK-8048:
-

[~iosonomarco] - what's the relation to JCR-34? Maybe you meant a different 
issue?

> 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
>Priority: Major
> Attachments: 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-04-01 Thread Marco Piovesana (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806689#comment-16806689
 ] 

Marco Piovesana commented on OAK-8048:
--

forgot to say that the patch is made from branch 1.10 and not 1.8.

Marco.

> 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
>Priority: Major
> Attachments: 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-03-31 Thread Marco Piovesana (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806165#comment-16806165
 ] 

Marco Piovesana commented on OAK-8048:
--

Hi all,

I would like to propose a solution for this bug (attached patch).

I saw that the class responsible for checking whether or not to remove the 
history is the {{OrphanedVersionCleaner}}, but I thought that was better to add 
the logic directly into {{ReadWriteVersionManager}} for three reasons:
 # All the logic used within the {{leave}} method works for nodes and not 
versions
 # The {{OrphanedVersionCleaner.leave}} method is called much more often than 
the {{ReadWriteVersionManager.removeVersion}}, that is called only when a 
version is removed
 # The class {{ReadWriteVersionManager}} contains already all the logic to 
check if the history is empty and remove it

let me know if the proposed solution if ok, or what can I do to make it better.

 

thanks, Marco.[^fix-OAK-8048.patch]

> 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
>Priority: Major
> Attachments: 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-02-19 Thread Marco Piovesana (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16772067#comment-16772067
 ] 

Marco Piovesana commented on OAK-8048:
--

For now, to force the history removal, do I have to delete the Tree object 
(like in the \{{ReadOnlyVersionManagerTest}}) or there's another way?

Marco.

> 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
>Priority: Major
>
> 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-02-18 Thread Marco Piovesana (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16771670#comment-16771670
 ] 

Marco Piovesana commented on OAK-8048:
--

Hi Marcel,

here the code snippet:
{code:java}
@Test
public void shouldDeleteNodeHistory() throws IOException, 
InvalidFileStoreVersionException, RepositoryException {
File root = new File(System.getProperty("java.io.tmpdir"), "oakTest");
File repo = new File(root, "content");

FileDataStore fileDataStore = new FileDataStore();
fileDataStore.init(repo.getAbsolutePath());
DataStoreBlobStore dataStoreBlobStore = new 
DataStoreBlobStore(fileDataStore);
FileStore fileStore = 
FileStoreBuilder.fileStoreBuilder(repo).withBlobStore(dataStoreBlobStore).build();
SegmentNodeStore nodeStore = 
SegmentNodeStoreBuilders.builder(fileStore).build();

Oak oak = new Oak(nodeStore);
Jcr jcrRepo = new Jcr(oak);
Repository repository = jcrRepo.createRepository();
try {
Session adminSession = repository.login(new 
SimpleCredentials("admin", "admin".toCharArray()));

adminSession.save();

Node myFolder = JcrUtils.getOrAddNode(adminSession.getRootNode(), 
"my node", JcrConstants.NT_UNSTRUCTURED);
myFolder.addMixin(JcrConstants.MIX_VERSIONABLE);

myFolder.addMixin(AccessControlConstants.MIX_REP_ACCESS_CONTROLLABLE);
adminSession.save();


adminSession.getWorkspace().getVersionManager().checkout(myFolder.getPath());

adminSession.getWorkspace().getVersionManager().checkin(myFolder.getPath());

adminSession.getWorkspace().getVersionManager().checkout(myFolder.getPath());

adminSession.getWorkspace().getVersionManager().checkin(myFolder.getPath());

VersionHistory versionHistory = 
adminSession.getWorkspace().getVersionManager().getVersionHistory(myFolder.getPath());
String historyNodePath = versionHistory.getPath();
VersionIterator allVersions = versionHistory.getAllVersions();
myFolder.remove();
adminSession.save();
while (allVersions.hasNext()) {
Version version = allVersions.nextVersion();
if (!version.getName().equals(JcrConstants.JCR_ROOTVERSION)) {
versionHistory.removeVersion(version.getName());
}
}
adminSession.save();
boolean historyExists = adminSession.itemExists(historyNodePath);
adminSession.logout();

assertFalse(historyExists);
} finally {
fileStore.close();
((JackrabbitRepository) repository).shutdown();
}
}
{code}
 

> 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
>Priority: Major
>
> 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-34):
>  # 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
(v7.6.3#76005)


[jira] [Commented] (OAK-8048) VersionHistory not removed when removing node and all its versions

2019-02-18 Thread Marcel Reutegger (JIRA)


[ 
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16771662#comment-16771662
 ] 

Marcel Reutegger commented on OAK-8048:
---

Thanks for reporting this issue. Can you please attach a test that reproduces 
the problem?

> 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
>Priority: Major
>
> 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-34):
>  # 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
(v7.6.3#76005)