facebook / facebook/rocksdb

iterate_upper_bound semantics/performance opportunities

Open
#6,040 2 comments 0 reactions 1 assignee Claimed by @siying View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

I should have probably looked at the actual implementation, but if `rocksdb::ReadOptions::iterate_upper_bound` is defined, then maybe, when iterating, instead of comparing each key against the prefix key provided in Seek(), the upper bound can be used to determine, well, the upper bound using e.g binary search, so that you can safely assume that within a range [start, end) all keys will be >= prefix and thus commit the comparison altogether.
Apologies if this is already the case -- it doesn't seem to be though.

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.