mapleFU commented on code in PR #2835:
URL: https://github.com/apache/kvrocks/pull/2835#discussion_r2002832502
##########
src/types/redis_bloom_chain.cc:
##########
@@ -214,8 +214,8 @@ rocksdb::Status BloomChain::InsertCommon(engine::Context
&ctx, const Slice &user
}
std::string data = bf_data_list.back().ToString();
bloomAdd(item_hash_list[i], data);
- *bf_data_list.back().GetSelf() = std::move(data);
Review Comment:
I reallized why this is wrong, since it's a bit hack, if
`rocksdb::PinnableSlice` is a pinned slice ( `pinned_ == true` ), it's
`GetSelf` returns nullptr.
However `PinSlice(data, nullptr)` might not a good idea for this, since it
would leak `data` after it dtor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]