"ldb compact" should force bottommost level compaction

Summary: Now "ldb compact" skips the bottommost level compaction. This is an unintended behavior change. Reverting it now. Maybe we need to add another mode later for it.

Test Plan: Run a manual test of 'ldb' to make sure bottom most level is compacted.

Reviewers: IslamAbdelRahman, yhchiang, anthony, kradhakrishnan, rven

Reviewed By: rven

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D50925
main
sdong 9 years ago
parent f831641204
commit 51fce92e11
  1. 5
      tools/ldb_cmd.cc

@ -449,7 +449,10 @@ void CompactorCommand::DoCommand() {
end = new Slice(to_);
}
db_->CompactRange(CompactRangeOptions(), begin, end);
CompactRangeOptions cro;
cro.bottommost_level_compaction = BottommostLevelCompaction::kForce;
db_->CompactRange(cro, begin, end);
exec_state_ = LDBCommandExecuteResult::Succeed("");
delete begin;

Loading…
Cancel
Save