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): crash due to pinnable slice in bloom filter #2843

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

mapleFU
Copy link
Member

@mapleFU mapleFU commented Mar 21, 2025

rocksdb::PinnableSlice has a pinned_ flag:

  1. If pinned_, GetSelf returns nullptr.
  2. Else, GetSelf returns pointer to self

Most case it's (2), but when we meet case (1), the code below fails:

*bf_data_list.back().GetSelf() = std::move(data);
bf_data_list.back().PinSelf();

This patch fixes that

It closes #2834.

@mapleFU mapleFU changed the title GH-2834: Fix bloom filter pinnable slice bug fix: GH-2834 bloom filter pinnable slice bug Mar 21, 2025
@mapleFU mapleFU requested a review from PragmaTwice March 21, 2025 13:32
@mapleFU
Copy link
Member Author

mapleFU commented Mar 21, 2025

@hll1213181368

@mapleFU
Copy link
Member Author

mapleFU commented Mar 24, 2025

@git-hulk @PragmaTwice Would you mind take a look? Test is added

@PragmaTwice PragmaTwice changed the title fix: GH-2834 bloom filter pinnable slice bug fix(bloom): crash due to pinnable slice in bloom filter Mar 25, 2025
@PragmaTwice PragmaTwice merged commit d6ea22a into apache:unstable Mar 25, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants