[ome-users] Deleting an object together with its directory in ManagedRepository

Mark Carroll m.t.b.carroll at dundee.ac.uk
Thu Nov 16 12:21:59 GMT 2017


On 11/15/2017 04:22 PM, Andrii Iudin wrote:

> Please could you tell if there is an option to do the removal of an
> image object together with the directory that contains it in
> ManagedRepository, if it is empty?
> Currently deleting with
> deleteObjects("Image", [image.Id()], deleteAnns = True)
>
> leaves an empty directory behind. It is relatively straightforward to
> clean those up manually, but it would be nice if it could be
> incorporated into the deletion procedure.

A good question Andrii! I'm afraid there isn't. The cleanup doesn't have
to be wholly manual in that I believe that "bin/omero admin cleanse"
will clean them up for you so one can simply run that periodically. We
were chatting about this a few months ago at
https://trello.com/c/mdFE3crY/ - it's really just a case of there being
limited developer resources and higher-priority tasks, but we'd gladly
review a PR that makes the removal automatic and could help point to the
relevant code.

It's my guess that it's unusual for institutions to get their image
repositories into a situation where they run out of inodes before they
run out of blocks. But, perhaps there are some filesystems starting out
with poor defaults, or popular workflows that involves importing plates
whose file format has many well samples / field images stored in
separate compressed files in different directories that are often
subsequently deleted. It's certainly fixable, it's just that we've not
known the impact on our user community to be severe enough to push it to
the top of our priority list.

-- Mark

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-users mailing list