4paradigm / 4paradigm/OpenMLDB
feat: disktable and memtable behave inconsistently when seeking with nonexistent pk
Abierto
enhancement
- Lenguaje dominante
- C++
- Estrellas
- 1.7k
- Forks
- 331
- Merge medio
- 12 d 12 h
- PR fusionados (30 d)
- 1
Descripción
Using the XxxTableTraverseIterator::Seek(const std::string& pk, uint64_t time) will get the next record after this (pk, time). In Memtable, it'll always get the next record. But in Disktable, if disktable does not contain a record with this pk, it will result in a not valid iterator.
**Additional context**
``` cpp
cfo.prefix_extractor.reset(new KeyTsPrefixTransform());
```
Here this extractor is used to get the pk from combineKey(pk, time). RocksDB will use this prefix to improve the searching speed. And using this extractor will cause seek to return not valid if pk is not found.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.