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
This commit is contained in:
parent
e03377c7fd
commit
65c95d9c59
@ -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…
Reference in New Issue
Block a user