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
This commit is contained in:
Abhishek Madan 2018-09-19 16:26:50 -07:00 committed by Facebook Github Bot
parent 9b3cf908a6
commit 519f8b145f

View File

@ -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));
}