From 9f7ccc8445a73217f7f9382bdaf8def2ce56ac5d Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Mon, 29 Jan 2018 11:30:37 -0800 Subject: [PATCH] fix db_bench filluniquerandom key count assertion Summary: It failed every time. I guess people usually ran with assertions disabled. Closes https://github.com/facebook/rocksdb/pull/3422 Differential Revision: D6822984 Pulled By: ajkr fbshipit-source-id: 2e90db75618b26ac1c46ddfa9e03c095c7bf16e3 --- tools/db_bench_tool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 083f130d2..177a4aeea 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -3504,7 +3504,7 @@ void VerifyDBFromDB(std::string& truth_db_name) { case RANDOM: return rand_->Next() % num_; case UNIQUE_RANDOM: - assert(next_ + 1 < num_); + assert(next_ < num_); return values_[next_++]; } assert(false);