From c92c467a3ab0b60484a0db83fcf89366791716cd Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Thu, 1 Aug 2024 19:07:14 -0700 Subject: [PATCH] Revert bloom filter name extension (#794) Signed-off-by: Yang Zhang --- librocksdb_sys/crocksdb/c.cc | 11 +---------- librocksdb_sys/libtitan_sys/titan | 2 +- librocksdb_sys/rocksdb | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/librocksdb_sys/crocksdb/c.cc b/librocksdb_sys/crocksdb/c.cc index ea58d546f..62c01775e 100644 --- a/librocksdb_sys/crocksdb/c.cc +++ b/librocksdb_sys/crocksdb/c.cc @@ -3907,9 +3907,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); } @@ -3931,12 +3930,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; @@ -3958,8 +3951,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/libtitan_sys/titan b/librocksdb_sys/libtitan_sys/titan index ff85fd19e..ecaa9ecda 160000 --- a/librocksdb_sys/libtitan_sys/titan +++ b/librocksdb_sys/libtitan_sys/titan @@ -1 +1 @@ -Subproject commit ff85fd19e6268c57b3b01c45aeae011299c1d542 +Subproject commit ecaa9ecda94443a183e7361669ca35f8e17c6c7d 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