Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sstable: index block always loaded; even if unused #3248

Open
jbowens opened this issue Jan 29, 2024 · 0 comments
Open

sstable: index block always loaded; even if unused #3248

jbowens opened this issue Jan 29, 2024 · 0 comments

Comments

@jbowens
Copy link
Collaborator

jbowens commented Jan 29, 2024

The singleLevelIterator and twoLevelIterator init methods both load the the highest index block. When CockroachDB is performing an MVCC Get, this may be unnecessary. If the iterator is only ever used for a call to SeekPrefixGE and the bloom filter is effective, the index block may never be seeked. It's unclear if this is at all impactful, and lazily loading the index block will inevitably add some small overhead and code complexity to seek operations.

Alternatively, we could implement a special Reader.GetPrefix method this optimization and others (#2002), without needing to edit the codepaths for other seek operations.

Jira issue: PEBBLE-116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant