From 365cf8130bf301931cf7d3068d59797698f29d74 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Mon, 5 Aug 2024 23:02:05 -0700 Subject: [PATCH] Revert bloom filter name extension (#794) (#795) --- librocksdb_sys/crocksdb/c.cc | 11 +---------- librocksdb_sys/rocksdb | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/librocksdb_sys/crocksdb/c.cc b/librocksdb_sys/crocksdb/c.cc index d4034e8e1..4aefde6bc 100644 --- a/librocksdb_sys/crocksdb/c.cc +++ b/librocksdb_sys/crocksdb/c.cc @@ -3848,9 +3848,8 @@ void crocksdb_filterpolicy_destroy(crocksdb_filterpolicy_t* filter) { // supplied C functions. struct FilterPolicyWrapper : public crocksdb_filterpolicy_t { const FilterPolicy* rep_; - std::string full_name_; ~FilterPolicyWrapper() override { delete rep_; } - const char* Name() const override { return full_name_.c_str(); } + const char* Name() const override { return rep_->Name(); } void CreateFilter(const Slice* keys, int n, std::string* dst) const override { return rep_->CreateFilter(keys, n, dst); } @@ -3872,12 +3871,6 @@ crocksdb_filterpolicy_t* crocksdb_filterpolicy_create_bloom_format( double bits_per_key, bool original_format) { FilterPolicyWrapper* wrapper = new FilterPolicyWrapper; wrapper->rep_ = NewBloomFilterPolicy(bits_per_key, original_format); - wrapper->full_name_ = wrapper->rep_->Name(); - if (original_format) { - wrapper->full_name_ += ".BlockBloom"; - } else { - wrapper->full_name_ += ".FullBloom"; - } wrapper->state_ = nullptr; wrapper->delete_filter_ = nullptr; wrapper->destructor_ = &FilterPolicyWrapper::DoNothing; @@ -3899,8 +3892,6 @@ crocksdb_filterpolicy_t* crocksdb_filterpolicy_create_ribbon( FilterPolicyWrapper* wrapper = new FilterPolicyWrapper; wrapper->rep_ = NewRibbonFilterPolicy(bloom_equivalent_bits_per_key, bloom_before_level); - wrapper->full_name_ = wrapper->rep_->Name(); - wrapper->full_name_ += ".Ribbon"; wrapper->state_ = nullptr; wrapper->delete_filter_ = nullptr; wrapper->destructor_ = &FilterPolicyWrapper::DoNothing; diff --git a/librocksdb_sys/rocksdb b/librocksdb_sys/rocksdb index 45509f0f5..3fe3ffaab 160000 --- a/librocksdb_sys/rocksdb +++ b/librocksdb_sys/rocksdb @@ -1 +1 @@ -Subproject commit 45509f0f530ad370863876fc1ee95ccf85bfe96d +Subproject commit 3fe3ffaab30b30de1428cb0aa604f237749650a4