support db_bench compact benchmark on bottommost files

Summary:
Without this option, running the compact benchmark on a DB containing only bottommost files simply returned immediately.
Closes https://github.com/facebook/rocksdb/pull/3138

Differential Revision: D6256660

Pulled By: ajkr

fbshipit-source-id: e3b64543acd503d821066f4200daa201d4fb3a9d
main
Andrew Kryczka 7 years ago committed by Facebook Github Bot
parent e03377c7fd
commit 65c95d9c59
  1. 4
      tools/db_bench_tool.cc

@ -5183,7 +5183,9 @@ void VerifyDBFromDB(std::string& truth_db_name) {
void Compact(ThreadState* thread) {
DB* db = SelectDB(thread);
db->CompactRange(CompactRangeOptions(), nullptr, nullptr);
CompactRangeOptions cro;
cro.bottommost_level_compaction = BottommostLevelCompaction::kForce;
db->CompactRange(cro, nullptr, nullptr);
}
void CompactAll() {

Loading…
Cancel
Save