jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Launay <sebastien.lau...@anyware-tech.com>
Subject Re: Deleting the version history of a node
Date Tue, 06 Jan 2009 09:55:10 GMT
Alexandru Popescu ☀ a écrit :
> On Mon, Jan 5, 2009 at 11:19 PM, Sébastien Launay
> <sebastien.launay@anyware-tech.com> wrote:
>   
>> You have to first delete the node and then its versions.
>> For this you need to store the version history before deleting the node.
>> Indeed, if you delete the node you cannot access the version history
>> anymore.
>>
>> Here an example, from JCR-134 test case:
>>
>> Node n = rootNode.addNode("test");
>> n.addMixin(mixVersionable);
>> rootNode.save();
>> VersionHistory vh = n.getVersionHistory();
>>
>> // From here there is the dumy root version
>> // and the base version references this root version
>>
>> // First version which will be the new base version
>> Version v10 = n.checkin();
>> n.checkout();
>>
>> // Second version which will be the new base version
>> Version v11 = n.checkin();
>> n.checkout();
>>
>> // Remove node
>> n.remove();
>> rootNode.save();
>>
>> // Remove the first version
>> vh.removeVersion(v10.getName());
>>
>> // Remove the second
>> vh.removeVersion(v11.getName());
>>
>> // vh still exists and it contains the empty
>> // and its immutable dummy root version
>>     
>
> Have you been able to decrease the disk space used by the repository
> after this operation has completed? Do you have any statistics by how
> much the disk space usage was reduced?
>
> I must confess that I am extremely interested in a solution in this
> direction and I would appreciate any ideas.
>
> ./alex
> --
> .w( the_mindstorm )p.
>   Alexandru Popescu
>
>   
Yes the disk usage has been reduced (shown using "du -sh" on the repository
folder with embedded derby persistence manager).

But, i do not have real statistics because the issue takes places is in
a production
environment and we do not want to change official jackrabbit jar to possible
unstable jar.
We could retrieve the official repository from our client but it is
quite huge and
contains sensible data...

--
Sébastien Launay


Mime
View raw message