diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index d1911aa4c3e6d73e22d06230e2d9efe24ffb83b1..70746d0e2136451911b640bc14534f3c1dd82142 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -4667,23 +4667,25 @@ void VerifyDBFromDB(std::string& truth_db_name) { int64_t seek = 0; int64_t seek_found = 0; int64_t bytes = 0; - int64_t value_max = FLAGS_mix_max_value_size; + const int64_t default_value_max = 64*1024*1024; + int64_t value_max = default_value_max; int64_t scan_len_max = FLAGS_mix_max_scan_len; double write_rate = 1000000.0; double read_rate = 1000000.0; - std::vector ratio; - char value_buffer[2 * value_max]; + std::vector ratio {FLAGS_mix_get_ratio, + FLAGS_mix_put_ratio, FLAGS_mix_seek_ratio}; + char value_buffer[default_value_max]; QueryDecider query; RandomGenerator gen; Status s; + if(value_max > FLAGS_mix_max_value_size) { + value_max = FLAGS_mix_max_value_size; + } ReadOptions options(FLAGS_verify_checksum, true); std::unique_ptr key_guard; Slice key = AllocateKey(&key_guard); PinnableSlice pinnable_val; - ratio.push_back(FLAGS_mix_get_ratio); - ratio.push_back(FLAGS_mix_put_ratio); - ratio.push_back(FLAGS_mix_seek_ratio); query.Initiate(ratio); // the limit of qps initiation