Open
Description
Current implementation of tablets that is going to be merged stores tablets for a given table in Vec
.
This is ok for searching, but insterting / deleting tablets requires moving part of the vector.
The alternative would be implementation based on some tree (maybe BTreeMap
is enough, maybe we would need external crate, I'm not sure). It would make insertion / deletion logarithmic instead of linear, but could have worse cache behavior.
It's hard to guess which version will be faster in practice - we should implement both and benchmark them on some workloads.