apache / apache/kvrocks

Using prefix bloom filter in range queries

Open
#1,977 8 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
4.4k
Forks
658
Avg merge
1d 20h
Merged PRs (30d)
10

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/kvrocks/issues) and found no similar issues.

### Motivation

Prefix seek / prefix bloom filter is proven to be useful when performing range queries of a collection of keys sharing the same prefix. Refer to [https://github.com/facebook/rocksdb/wiki/Prefix-Seek] for more detailed usage. I saw there're some APIs inside storage layer that performs range query logic. They could get benefits from using aforementioned prefix bloom filter.

### Solution

I haven't summarized all potential use case of prefix bloom filter, however, `FindKeyRangeWithPrefix` could definitely benefit from it by configuring the `prefix_extractor`.

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the storage-layer FindKeyRangeWithPrefix entry point and reading the other range-query APIs around it. Review the RocksDB Prefix-Seek guidance, then identify the relevant existing range-query tests; done means the prefix_extractor is configured for this path and the tests verify the range query benefits without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.