Implement defragment operation for lsm_store #28
Labels
No labels
Kind/Bug
Kind/Enhancement
Kind/Feature
Project/Lander
Project/Landerctl
idea
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/lander#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. 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 forto Implement defragment operation forlsm_storelsm_store