Fix minor wrong variable name in db_bench (#8549)

Summary:
Fix a minor variable name that is not accurate. This is recently introduced in https://github.com/facebook/rocksdb/pull/7818

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8549

Reviewed By: zhichao-cao

Differential Revision: D29745585

fbshipit-source-id: 6268b348878fdf99a162b2cc3d5876fbd9bb10d9
main
sdong 3 years ago committed by Facebook GitHub Bot
parent f4529a54bb
commit bbc85a5f22
  1. 7
      tools/db_bench_tool.cc

@ -6234,18 +6234,19 @@ class Benchmark {
} }
// Pick a Iterator to use // Pick a Iterator to use
size_t cf_to_use = (db_.db == nullptr) size_t db_idx_to_use =
(db_.db == nullptr)
? (size_t{thread->rand.Next()} % multi_dbs_.size()) ? (size_t{thread->rand.Next()} % multi_dbs_.size())
: 0; : 0;
std::unique_ptr<Iterator> single_iter; std::unique_ptr<Iterator> single_iter;
Iterator* iter_to_use; Iterator* iter_to_use;
if (FLAGS_use_tailing_iterator) { if (FLAGS_use_tailing_iterator) {
iter_to_use = tailing_iters[cf_to_use]; iter_to_use = tailing_iters[db_idx_to_use];
} else { } else {
if (db_.db != nullptr) { if (db_.db != nullptr) {
single_iter.reset(db_.db->NewIterator(options)); single_iter.reset(db_.db->NewIterator(options));
} else { } else {
single_iter.reset(multi_dbs_[cf_to_use].db->NewIterator(options)); single_iter.reset(multi_dbs_[db_idx_to_use].db->NewIterator(options));
} }
iter_to_use = single_iter.get(); iter_to_use = single_iter.get();
} }

Loading…
Cancel
Save