From f4529a54bba97ca81c83e74c87cf780377096f01 Mon Sep 17 00:00:00 2001 From: Baptiste Lemaire Date: Mon, 19 Jul 2021 11:18:22 -0700 Subject: [PATCH] Add experimental_allow_mempurge flag to benchmark. (#8546) Summary: Tiny PR to add the `experimental_allow_mempurge` to the `db_bench` tool (`Mempurge` is the current prototype for memtable garbage collection). This is useful to benchmark the prototype of this new feature, stress test it and help find new meaningful heuristics for GC. By default, the flag to allow `mempurge` is set to `false`. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8546 Reviewed By: anand1976 Differential Revision: D29738338 Pulled By: bjlemaire fbshipit-source-id: 01892883a2f1c714c110718674da05992d6e2dd6 --- tools/db_bench_tool.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 90bc54b2f..2af9ccb71 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -1229,6 +1229,9 @@ DEFINE_bool( DEFINE_bool(allow_concurrent_memtable_write, true, "Allow multi-writers to update mem tables in parallel."); +DEFINE_bool(experimental_allow_mempurge, false, + "Allow memtable garbage collection."); + DEFINE_bool(inplace_update_support, ROCKSDB_NAMESPACE::Options().inplace_update_support, "Support in-place memtable update for smaller or same-size values"); @@ -4302,6 +4305,7 @@ class Benchmark { options.delayed_write_rate = FLAGS_delayed_write_rate; options.allow_concurrent_memtable_write = FLAGS_allow_concurrent_memtable_write; + options.experimental_allow_mempurge = FLAGS_experimental_allow_mempurge; options.inplace_update_support = FLAGS_inplace_update_support; options.inplace_update_num_locks = FLAGS_inplace_update_num_locks; options.enable_write_thread_adaptive_yield =