jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Vidyadharan <rak...@sptci.com>
Subject Cleaning up version history
Date Fri, 20 Jun 2014 15:34:20 GMT
Hello all,

We are using JackRabbit 2.4.3 through Magnolia CMS.  Our users had used the documents workspace
provided by Magnolia to upload large media files (movies, audio), some of which are over 100mb.
 We migrated all that content away from Magnolia/JackRabbit into a regular Apache webserver,
and I set up a DataStore Garbage Collector task to remove the underlying files that had been
make unreachable by deleting the nodes.

It turns out that the documents workspace in Magnolia uses versioning, so after the GC run,
I did not see much of a difference in the repository disk usage.  I followed the steps outlined
in http://stackoverflow.com/questions/3292719/how-do-you-restore-a-versioned-node-in-a-jackrabbit-2-1-repository
to iterate over all the version history for the workspace, and found the versions that were
saved for the nodes that we had deleted.  I assume it is the version history that prevents
the GC from removing the underlying files.

Unlike the code in that post, iterating the version history nodes does not return instances
of javax.jcr.version.Version, but just regular javax.jcr.Node with primary node type nt:version.
 I adapted my code accordingly to see the versions that are stored.  The question is how do
I go about removing these versions from the workspace (we absolutely do not need those versions)?
 The JCR API does not seem to give me any way to even restore these nodes if I wanted to,
since the API seems to require the original node, from which I can then iterate over the saved
versions and remove if needed.  In our case the original nodes have been removed, so there
is no starting point to use to iterate over the version history.

For now, I have hacked a solution where, I look up the file name for the jcr:data, and then
using the directory structure JackRabbit uses, delete the underlying files, so I have reclaimed
the disk space.  This is obviously non-ideal, and I would like to find out the proper way
to go about removing old versions we do not need and reclaiming the disk space.

Thanks
Rakesh
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message