Closed prataprc closed 6 years ago
With the latest re-arch of bubt, where intermediate nodes are stored in m-index file while leaf nodes are stored in z-index file, we can leverage on mmap feature supported by OpenSnapshot().
OpenSnapshot() will always open the m-index file in mmap mode. OpenSnapshot() will open z-index file and value-log (if present) in mmap mode only when requested by function argument.
mmap covers the caching requirement for the intermediate nodes.
When Opening a well-formed bubt-index cache the intermediate nodes (m-blocks) in memory. Either using golang
map
or usingllrb
or some other fast lookup mechanism. It should typically be a map of fpos->mblock buffer.Implement this as a configurable feature.