From 1e4f44f41dc0b227547cf5ef05848345dada4193 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 17 Mar 2023 21:22:46 -0700 Subject: [PATCH] ircd::db: Deprecate compressed block cache. (RocksDB 8.0) --- include/ircd/db/column.h | 4 ++-- ircd/db.cc | 4 ++-- ircd/db_database.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ircd/db/column.h b/include/ircd/db/column.h index dd60dc26c..97e95d519 100644 --- a/include/ircd/db/column.h +++ b/include/ircd/db/column.h @@ -38,9 +38,9 @@ namespace ircd::db template<> prop_map property(const column &, const string_view &name); // Access to the column's caches (see cache.h interface) - const rocksdb::Cache *cache_compressed(const column &); + [[gnu::deprecated]] const rocksdb::Cache *cache_compressed(const column &); const rocksdb::Cache *cache(const column &); - rocksdb::Cache *cache_compressed(column &); + [[gnu::deprecated]] rocksdb::Cache *cache_compressed(column &); rocksdb::Cache *cache(column &); // [GET] Tests if key exists diff --git a/ircd/db.cc b/ircd/db.cc index dbfa8bf0c..31755a1b0 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -3204,7 +3204,7 @@ rocksdb::Cache * ircd::db::cache_compressed(column &column) { database::column &c(column); - return c.table_opts.block_cache_compressed.get(); + return nullptr; // c.table_opts.block_cache_compressed.get(); } [[gnu::hot]] @@ -3219,7 +3219,7 @@ const rocksdb::Cache * ircd::db::cache_compressed(const column &column) { const database::column &c(column); - return c.table_opts.block_cache_compressed.get(); + return nullptr; // c.table_opts.block_cache_compressed.get(); } template<> diff --git a/ircd/db_database.cc b/ircd/db_database.cc index e89c13f55..41e52c024 100644 --- a/ircd/db_database.cc +++ b/ircd/db_database.cc @@ -1985,7 +1985,7 @@ ircd::db::database::column::column(database &d, // Setup the cache for compressed assets. const auto &cache_size_comp(this->descriptor->cache_size_comp); if(cache_size_comp != 0) - table_opts.block_cache_compressed = std::make_shared(this->d, this->stats, this->allocator, this->name, cache_size_comp); + ; //table_opts.block_cache_compressed = std::make_shared(this->d, this->stats, this->allocator, this->name, cache_size_comp); // Setup the bloom filter. const auto &bloom_bits(this->descriptor->bloom_bits); @@ -2059,7 +2059,7 @@ ircd::db::database::column::column(database &d, this->cmp.Name(), this->options.prefix_extractor? this->prefix.Name() : "none", table_opts.block_cache? "YES": "NO", - table_opts.block_cache_compressed? "YES": "NO", + "NO", //table_opts.block_cache_compressed? "YES": "NO", this->descriptor->bloom_bits, int(this->options.compression), this->descriptor->name