docs icon indicating copy to clipboard operation
docs copied to clipboard

Spec: how to delete files?

Open bnewbold opened this issue 8 years ago • 2 comments
trafficstars

From experimentation, it looks like deletes are encoded by adding a Node entry with no Stat... but with updated children?

If somebody replies to this issue I can submit a PR updating the paper.

bnewbold avatar Oct 30 '17 03:10 bnewbold

As far as I can tell, deletions are handled by writing a new Node at the old path with no Stat. children for this Node should have all references to the old entry deleted at all hierarchy levels. The new index (aka, the deletion version) should be included as the most recent entry at all currently non-empty directory levels (aka, deleting a single deeply nested file results in a shorter children list than previously).

bnewbold avatar Nov 26 '17 02:11 bnewbold

There is another level of complexity: deleted nodes (aka, empty nodes or "tombstones") can be be garbage collected on any write to the register. This is tricky/hard! Will probably be removed in hyperdb, or left as an optional optimization.

bnewbold avatar Jan 03 '18 09:01 bnewbold