Skip to content

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

Copy link

@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
Development

Successfully merging this pull request may close these issues.

Bloom filter continuously inserting data, causes the server to crash. error is Ooops! Apache Kvrocks version 2.11.1 got signal: Segmentation fault (11)
3 participants