facebook / facebook/rocksdb

DB Iterator Seek should reuse SST's Iterator

Open
#10,591 1 comment 0 reactions 0 assignees View on GitHub
design discussion up-for-grabs
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected behavior
DB Iterator Seek should reuse SST's Iterator.

### Actual behavior
DB Iterator Seek always create new SST Iterators if target key miss old SST.

### Steps to reproduce the behavior
Create a DB iterator and repeatedly calling `Seek` with different keys hitting different SST.

---
DB Iterator is an heavy object and it should be reused if possible, thus when DB Iterator is reused the underlying SST's should also be reused, we have add the SST Iter cache to `LevelIterator` in our in house branch, but it fails several unit tests, we are still inspecting it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.