I am working on the next PR for
https://github.com/slatedb/slatedb/issues/53 .
It involves i) Add a new snapshot ii) incrementing epoch iii) write empty wal to fence.
Both manifest design and compaction design does not cover when a writer moves to a new manifest. It could be an implementation detail. In the PR that i am working on, I will need to remove the snapshot being used by writer. This would happen whenever the writer moves to a new snapshot (due to compaction) or when it closes.
I am going to only do it on close for now, the snapshot will have infinite retention. This does have an issue, where the writer doesn't do a clean shutdown. To address it, we will need to add a snapshot refresh thread. Instead, we could do it in the same thread that looks for new manifest from compactor.