提交 bbc85a5f 编写于 作者: S sdong 提交者: Facebook GitHub Bot

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
上级 f4529a54
......@@ -6234,18 +6234,19 @@ class Benchmark {
}
// Pick a Iterator to use
size_t cf_to_use = (db_.db == nullptr)
? (size_t{thread->rand.Next()} % multi_dbs_.size())
: 0;
size_t db_idx_to_use =
(db_.db == nullptr)
? (size_t{thread->rand.Next()} % multi_dbs_.size())
: 0;
std::unique_ptr<Iterator> single_iter;
Iterator* iter_to_use;
if (FLAGS_use_tailing_iterator) {
iter_to_use = tailing_iters[cf_to_use];
iter_to_use = tailing_iters[db_idx_to_use];
} else {
if (db_.db != nullptr) {
single_iter.reset(db_.db->NewIterator(options));
} 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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册