convex
convex copied to clipboard
Mark and Sweep GC for Storage
It should be possible to do a concurrent mark+sweep on the storage file to discard old data
Rough Procedure:
- Set a "marking" flag (which will cause new additions to be automatically marked)
- Mark all values to retain (at Peer's discretion)
- Copy marked values to new storage file
- Atomically switch Peer to using the new storage file, with cleared marking flag
- Delete / archive old storage file as desired