Implement defragment operation for lsm_store
#28
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
An active database will inevitably accumulate some internal fragmentation. To fight this, a defragment operation can be introduced when can e.g. run on startup.
Implementing this should be very simple: iterate over the idx file, write any entries with a length greater than zero to a new idx file, and write the respective data from the database to a new database file. The indexes of the idx file entries will need to be adjusted though, as the database file's offsets will have changed.
Implement vacuum operation for `lsm_store`to Implement defragment operation for `lsm_store`