coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

Clean up blocks from alternate timelines #317

Open barakmich opened 8 years ago

barakmich commented 8 years ago

Follow up to #230.

Blocks from an old lease can be still be written, and will be GCed when the volume gets used again. Until then, there's a window where there are some blocks from an unacknowledged timeline that haven't been cleaned. It's cruft.

This also shows up when using snapshots. Rolling back to a previous snap, currently, means that all the data written since the rollback is still live, until the rolled-back volume is used.

These can be solved separately or together. Snaps, for instance, can mint a new inode with all the old data referenced, thus invalidating the interim data.

Together would be some way of marking high/low water on disconnect, such that information is left for the GC when the metadata operation completes.