Open rubend056 opened 4 months ago
Hi @rubend056 , in fact the only code you really need is to read and write the database again, https://github.com/njaard/sonnerie/blob/master/src/main.rs#L490 and then the _purge_compacted_files
It's not part of the API because I just didn't know what it would look like.
Sorry for the delayed response, I'll make a commit to my fork and a pull request today :) let me know of any issues you can spot.
Is there any way the compaction interface can be reformatted so its exported from lib.
This is extremely useful as it allows compaction to be done at regular intervals from a downstream crate executable, instead of having to manually run the sonnerie command line tool.
I will try to give it a go on a pull request, but I remember looking at it before and it not being trivial.