Spec: how to delete files?
bnewbold opened this issue · comments
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.
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).
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.