"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
This commit is contained in:
sdong 2015-11-17 14:45:26 -08:00
parent f831641204
commit 51fce92e11

View File

@ -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;