b2share icon indicating copy to clipboard operation
b2share copied to clipboard

files: add a files garbage-collector

Open nharraud opened this issue 8 years ago • 0 comments

Problem: Deleting a record or a Deposit also deletes the bucket and the ObjectVersion, but the FileInstance is still kept and the actual file is not deleted from the file-system.

Solution: We should delete any FileInstance which is not referenced by any ObjectVersion, as well as the actual file.

Note: deletion of the actual file should be done before deleting the FileInstance in order to avoid having files which are not referenced anywhere in the DB.

nharraud avatar Dec 20 '17 14:12 nharraud