diff --git a/db_stress_tool/db_stress_common.h b/db_stress_tool/db_stress_common.h index 810fafa5d4..7e57fdd8f7 100644 --- a/db_stress_tool/db_stress_common.h +++ b/db_stress_tool/db_stress_common.h @@ -141,6 +141,7 @@ DECLARE_uint64(subcompactions); DECLARE_uint64(periodic_compaction_seconds); DECLARE_uint64(compaction_ttl); DECLARE_bool(allow_concurrent_memtable_write); +DECLARE_bool(experimental_allow_mempurge); DECLARE_bool(enable_write_thread_adaptive_yield); DECLARE_int32(reopen); DECLARE_double(bloom_bits); diff --git a/db_stress_tool/db_stress_gflags.cc b/db_stress_tool/db_stress_gflags.cc index 767bf18b09..f44f508c66 100644 --- a/db_stress_tool/db_stress_gflags.cc +++ b/db_stress_tool/db_stress_gflags.cc @@ -326,6 +326,9 @@ DEFINE_uint64(compaction_ttl, 1000, DEFINE_bool(allow_concurrent_memtable_write, false, "Allow multi-writers to update mem tables in parallel."); +DEFINE_bool(experimental_allow_mempurge, false, + "Allow mempurge process to collect memtable garbage bytes."); + DEFINE_bool(enable_write_thread_adaptive_yield, true, "Use a yielding spin loop for brief writer thread waits."); diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index 5d76b5787b..fe6f9381da 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -2259,6 +2259,7 @@ void StressTest::Open() { options_.max_subcompactions = static_cast(FLAGS_subcompactions); options_.allow_concurrent_memtable_write = FLAGS_allow_concurrent_memtable_write; + options_.experimental_allow_mempurge = FLAGS_experimental_allow_mempurge; options_.periodic_compaction_seconds = FLAGS_periodic_compaction_seconds; options_.ttl = FLAGS_compaction_ttl; options_.enable_pipelined_write = FLAGS_enable_pipelined_write; diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 57dbf65e88..10e5091ac6 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -220,6 +220,7 @@ whitebox_default_params = { simple_default_params = { "allow_concurrent_memtable_write": lambda: random.randint(0, 1), "column_families": 1, + "experimental_allow_mempurge": 0, "max_background_compactions": 1, "max_bytes_for_level_base": 67108864, "memtablerep": "skip_list",