One of the advantage of using read-only immutable btree index is that caching the btree-blocks are very straight-forward. A typical requirement would be:
- Have an in-memory (key,value) map where key is file-position as u64 type and value is
Vec<Entry<K,V,D>>. Note that we can as well cache parsed blocks.
- We cannot cache all blocks, to limit caching we do the following.
- Cache all inter-mediate blocks upto N levels.
- Cache all intermediate blocks, but not leaf-blocks.
- Now caching leaf-blocks would require an eviction strategy. We can handle that as a separate issue.
One of the advantage of using read-only immutable btree index is that caching the btree-blocks are very straight-forward. A typical requirement would be:
Vec<Entry<K,V,D>>. Note that we can as well cache parsed blocks.