Fix db_bench's multireadrandom

Summary: multireadrandom is broken. Fix it

Test Plan: run it and see segfault has gone.

Reviewers: ljin

Reviewed By: ljin

CC: leveldb

Differential Revision: https://reviews.facebook.net/D17781
This commit is contained in:
sdong
2014-04-14 15:42:20 -07:00
parent 118f88d25d
commit c87ed0942c

View File

@@ -1908,7 +1908,7 @@ class Benchmark {
int64_t read = 0;
int64_t found = 0;
ReadOptions options(FLAGS_verify_checksum, true);
std::vector<Slice> keys(entries_per_batch_);
std::vector<Slice> keys;
std::vector<std::string> values(entries_per_batch_);
while (keys.size() < entries_per_batch_) {
keys.push_back(AllocateKey());