#1194 new defect

Garbage Collector need to remove subdirs of storage/shares when deleting shares — at Version 2

Reported by: freestorm Owned by: nobody
Priority: normal Milestone: eventually
Component: code-storage Version: 1.8β
Keywords: munin statistics easy Cc:
Launchpad Bug:

Description (last modified by davidsarah)

As discussed with Warner on IRC,

When GC deletes shares on the grid, it doesn't remove prefixdir and storageindex-dir.

The munin plugin tahoe_files counts storageindex-dir to know how many files are on the Grid.

The count is not correct because empty subdirs are present on storage/shares/.

Change History (2)

comment:1 Changed at 2010-09-06T22:41:40Z by warner

  • Component changed from unknown to code-storage

In particular, when a share lives in BASEDIR/storage/shares/PREFIXDIR/SIDIR/SHNUM (e.g. node-1/storage/shares/d5/d5j2wyxwvrwiftiwvujhozu67i/3), if we delete the last share in the SIDIR, then we should also delete the SIDIR (but leave the PREFIXDIR), e.g. leave node-1/storage/shares/d5 but delete everything below that.

This requires code in allmydata.storage.immutable.ShareFile.unlink and allmydata.storage.mutable.MutableShareFile.unlink to look in the parent directory, see if it's empty, and if so unlink the parent.

comment:2 Changed at 2010-09-07T00:26:14Z by davidsarah

  • Description modified (diff)
  • Keywords munin statistics easy added
Note: See TracTickets for help on using tickets.