Add a GC to the lmdb backend
Here is a first PoC to add a gc
command to the lmdb backend. The current strategy for the GC is "stop-and-copy", e.g:
- the GC cannot run concurrently with any other writes
- we create a temporary file to promote living objects
- once scanning is done and all living objects are promoted, we rename the database file and re-open the database handler
Also, it seems that the current implementation "freeze" the application (e.g. CTRL-C won't work anymore) so there is probably something to do with signal hander.
Few things needs to be cleaned up before merging, but I wanted to have an early feedback.
Edited by Thomas Gazagnaire