Closed
Description
Background
In #5 , we introduced unsaved additions and unsaved removals in mutable_tree.go
. Since the fast index, introduces additional overhead on writes (which is normal for indexes), we would like to ensure that writes are being committed in the most optimal way
Currently, writes to disk work in the following way (in SaveVersion
):
- unsaved additions get sorted by key, then added to
goleveldb
batch - unsaved removals get sorted by key, then added to
goleveldb
batch goleveldb
batch gets written to disk
When we batch operations, goleveldb
simply appends them to the batch. Then, on commit, goleveldb
batch sequentially applies them. Therefore, the above write pattern might not be the most efficient. We should investigate and document what write pattern would be the most efficient.
Potential alternatives:
- apply removals first, then additions
- sort and merge removals with additions and apply them together
Acceptance Criteria
- investigate and document how leveldb works
- analyze the proposed alternatives
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done ✅