From 8f154e5c5187964d175bf9cca07b15212bee77d7 Mon Sep 17 00:00:00 2001 From: ZhaoMing Date: Wed, 15 Dec 2021 17:17:22 +0800 Subject: [PATCH] Fix ClockCacheShard::Erase Fix db_bench --- cache/clock_cache.cc | 2 +- tools/db_bench_tool.cc | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/cache/clock_cache.cc b/cache/clock_cache.cc index 4fdd023e27..8f0d500283 100644 --- a/cache/clock_cache.cc +++ b/cache/clock_cache.cc @@ -649,7 +649,7 @@ bool ClockCacheShard::Release(Cache::Handle* h, bool force_erase) { bool ClockCacheShard::Erase(const Slice& key, uint32_t hash) { CleanupContext context; - bool ret EraseAndConfirm(key, hash, &context); + bool ret = EraseAndConfirm(key, hash, &context); Cleanup(context); return ret; } diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 79b3242595..da6fb66443 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -510,10 +510,6 @@ DEFINE_double(data_block_hash_table_util_ratio, 0.75, DEFINE_int64(compressed_cache_size, -1, "Number of bytes to use as a cache of compressed data."); -DEFINE_int64(row_cache_size, 0, - "Number of bytes to use as a cache of individual rows" - " (0 = disabled)."); - DEFINE_int32(open_files, TERARKDB_NAMESPACE::Options().max_open_files, "Maximum number of files to keep open at the same time" " (use default if == 0)"); @@ -735,7 +731,6 @@ DEFINE_string( "that are related to RocksDB options will be ignored:\n" "\t--use_existing_db\n" "\t--statistics\n" - "\t--row_cache_size\n" "\t--row_cache_numshardbits\n" "\t--enable_io_prio\n" "\t--dump_malloc_stats\n" @@ -3667,14 +3662,6 @@ class Benchmark { FLAGS_bloom_bits, FLAGS_use_block_based_filter)); } } - if (FLAGS_row_cache_size) { - if (FLAGS_cache_numshardbits >= 1) { - options.row_cache = - NewLRUCache(FLAGS_row_cache_size, FLAGS_cache_numshardbits); - } else { - options.row_cache = NewLRUCache(FLAGS_row_cache_size); - } - } if (FLAGS_enable_io_prio) { FLAGS_env->LowerThreadPoolIOPriority(Env::LOW); FLAGS_env->LowerThreadPoolIOPriority(Env::HIGH);