From 519f8b145f6d23cce58e5e41e0cc7094d5a61cb7 Mon Sep 17 00:00:00 2001 From: Abhishek Madan Date: Wed, 19 Sep 2018 16:26:50 -0700 Subject: [PATCH] Generate appropriate number of keys in db_bench (#4404) Summary: If range tombstones are generated every few writes, the KeyGenerator's limit is now extended to account for the additional Next() calls. This is primarily important for `filluniquerandom` benchmarks that enforce the call limit. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4404 Differential Revision: D9949326 Pulled By: abhimadan fbshipit-source-id: 0bdfeb2cad2098dc0b8b029236dab5e4bef25e38 --- tools/db_bench_tool.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index c8ccfbd22..e3560d6fa 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -3794,7 +3794,8 @@ void VerifyDBFromDB(std::string& truth_db_name) { Duration duration(test_duration, max_ops, ops_per_stage); for (size_t i = 0; i < num_key_gens; i++) { - key_gens[i].reset(new KeyGenerator(&(thread->rand), write_mode, num_, + key_gens[i].reset(new KeyGenerator(&(thread->rand), write_mode, + num_ + max_num_range_tombstones_, ops_per_stage)); } -- GitLab