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
main
Abhishek Madan 6 years ago committed by Facebook Github Bot
parent 9b3cf908a6
commit 519f8b145f
  1. 3
      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));
}

Loading…
Cancel
Save