Skip to content

Commit

Permalink
Fix ClockCacheShard::Erase
Browse files Browse the repository at this point in the history
Fix db_bench
  • Loading branch information
mm304321141 committed Jan 18, 2022
1 parent 069a07b commit 8f154e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion cache/clock_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
13 changes: 0 additions & 13 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8f154e5

Please sign in to comment.