I’m hoping to use Badger to index files available on disk. One of the things I need to be able to support is removing files from disk once they’ve been GC’d from the Badger database. Is there a way to get a callback or otherwise detect when the last transaction that “sees” a key is finished? As I understand it, due to MVCC, I can’t simply remove the file on-disk after the Badger transaction is committed, since other transactions may still “see” the key/value pair until they’ve also finished.
Is there an easy way to do this?