Add max_background_jobs to db_bench

Summary:
As titled. Also fixed an off-by-one error causing us to add one less range deletion than the user specified.
Closes https://github.com/facebook/rocksdb/pull/2544

Differential Revision: D5383451

Pulled By: ajkr

fbshipit-source-id: cbd5890c33f09bbb5c0c1f4bb952a1add32336e0
main
Andrew Kryczka 7 years ago committed by Facebook Github Bot
parent a43c053ad8
commit 657df29eaf
  1. 8
      tools/db_bench_tool.cc

@ -313,6 +313,11 @@ DEFINE_int32(max_write_buffer_number_to_maintain,
"after they are flushed. If this value is set to -1, "
"'max_write_buffer_number' will be used.");
DEFINE_int32(max_background_jobs,
rocksdb::Options().max_background_jobs,
"The maximum number of concurrent background jobs that can occur "
"in parallel.");
DEFINE_int32(max_background_compactions,
rocksdb::Options().max_background_compactions,
"The maximum number of concurrent background compactions"
@ -2855,6 +2860,7 @@ void VerifyDBFromDB(std::string& truth_db_name) {
FLAGS_min_write_buffer_number_to_merge;
options.max_write_buffer_number_to_maintain =
FLAGS_max_write_buffer_number_to_maintain;
options.max_background_jobs = FLAGS_max_background_jobs;
options.max_background_compactions = FLAGS_max_background_compactions;
options.max_subcompactions = static_cast<uint32_t>(FLAGS_subcompactions);
options.max_background_flushes = FLAGS_max_background_flushes;
@ -3494,7 +3500,7 @@ void VerifyDBFromDB(std::string& truth_db_name) {
bytes += value_size_ + key_size_;
++num_written;
if (writes_per_range_tombstone_ > 0 &&
num_written / writes_per_range_tombstone_ <
num_written / writes_per_range_tombstone_ <=
max_num_range_tombstones_ &&
num_written % writes_per_range_tombstone_ == 0) {
int64_t begin_num = key_gens[id]->Next();

Loading…
Cancel
Save