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

Fix bloom filter compatibility issue caused by naming #365

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

v01dstar
Copy link

@v01dstar v01dstar commented Jul 16, 2024

tikv/tikv#17272
This is a temp fix for 6.29. Will propose a different fix for 8.10.

Since TiKV only uses RocksDB builtin bloom filters, this should be able to fix the issue.
Also planning to revert the PR that introduced this bug in rust-rocksdb, i.e. remove the suffix like ".FullBloom", "BlockBloom" and "Ribbon". After all, "BlockBloom" has been deprecated in RocksDB newer versions anyway.

@v01dstar
Copy link
Author

@hbisheng

if (key.starts_with(prefix)) {
key.remove_suffix(prefix.size());
Slice filter_policy_name_slice = Slice(rep_->filter_policy->Name());
if (key.starts_with("rocksdb.BuiltinBloomFilter") ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: v01dstar <[email protected]>
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangjinpeng87 zhangjinpeng87 merged commit 3fe3ffa into tikv:6.29.tikv Jul 25, 2024
3 checks passed
@v01dstar v01dstar deleted the fix-filter branch July 29, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants