From caadf09d535fbcb42302229f03c5752271bef8a5 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 4 Nov 2021 16:02:17 -0700 Subject: [PATCH] Add options.manual_wal_flush to db_bench (#9132) Summary: It is useful to add options.manual_wal_flush to db_bench Pull Request resolved: https://github.com/facebook/rocksdb/pull/9132 Test Plan: Run the benchamrk with the option. Reviewed By: ltamasi Differential Revision: D32188060 fbshipit-source-id: a70835d3cad0f30095218dfda1daff0a432892e5 --- 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 fa23de2119..52c7c2b53f 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -759,6 +759,9 @@ DEFINE_bool(use_fsync, false, "If true, issue fsync instead of fdatasync"); DEFINE_bool(disable_wal, false, "If true, do not write WAL for write."); +DEFINE_bool(manual_wal_flush, false, + "If true, buffer WAL until buffer is full or a manual FlushWAL()."); + DEFINE_string(wal_dir, "", "If not empty, use the given dir for WAL"); DEFINE_string(truth_db, "/dev/shm/truth_db/dbbench", @@ -3975,6 +3978,7 @@ class Benchmark { options.use_direct_reads = FLAGS_use_direct_reads; options.use_direct_io_for_flush_and_compaction = FLAGS_use_direct_io_for_flush_and_compaction; + options.manual_wal_flush = FLAGS_manual_wal_flush; #ifndef ROCKSDB_LITE options.ttl = FLAGS_fifo_compaction_ttl; options.compaction_options_fifo = CompactionOptionsFIFO(