From 8954f830a0a870a8a79c1ce2025d796b962bbf26 Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Mon, 20 Nov 2017 23:19:46 -0800 Subject: [PATCH] Blob DB: db_bench flag to control BlobDB's garbage collection Summary: flag: blob_db_enable_gc, to control BlobDb's enable_garbage_collection. Closes https://github.com/facebook/rocksdb/pull/3190 Differential Revision: D6383395 Pulled By: sagar0 fbshipit-source-id: 4134e835150748c425b8187264273a54c6d8381c --- tools/db_bench_tool.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 150da2099..fe29b100d 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -618,14 +618,11 @@ DEFINE_bool(expand_range_tombstones, false, "Expand range tombstone into sequential regular tombstones."); #ifndef ROCKSDB_LITE +// Transactions Options DEFINE_bool(optimistic_transaction_db, false, "Open a OptimisticTransactionDB instance. " "Required for randomtransaction benchmark."); -DEFINE_bool(use_blob_db, false, - "Open a BlobDB instance. " - "Required for largevalue benchmark."); - DEFINE_bool(transaction_db, false, "Open a TransactionDB instance. " "Required for randomtransaction benchmark."); @@ -661,11 +658,22 @@ DEFINE_string( "\t--dump_malloc_stats\n" "\t--num_multi_db\n"); +// FIFO Compaction Options DEFINE_uint64(fifo_compaction_max_table_files_size_mb, 0, "The limit of total table file sizes to trigger FIFO compaction"); + DEFINE_bool(fifo_compaction_allow_compaction, true, "Allow compaction in FIFO compaction."); + DEFINE_uint64(fifo_compaction_ttl, 0, "TTL for the SST Files in seconds."); + +// Blob DB Options +DEFINE_bool(use_blob_db, false, + "Open a BlobDB instance. " + "Required for largevalue benchmark."); + +DEFINE_bool(blob_db_enable_gc, false, + "Enable BlobDB garbage collection"); #endif // ROCKSDB_LITE DEFINE_bool(report_bg_io_stats, false, @@ -3382,6 +3390,7 @@ void VerifyDBFromDB(std::string& truth_db_name) { } } else if (FLAGS_use_blob_db) { blob_db::BlobDBOptions blob_db_options; + blob_db_options.enable_garbage_collection = FLAGS_blob_db_enable_gc; blob_db::BlobDB* ptr = nullptr; s = blob_db::BlobDB::Open(options, blob_db_options, db_name, &ptr); if (s.ok()) {