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
main
sdong 11 years ago
parent 118f88d25d
commit c87ed0942c
  1. 2
      db/db_bench.cc

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

Loading…
Cancel
Save