diff --git a/db/db_impl.cc b/db/db_impl.cc index 923abd5db..2ed749909 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1196,7 +1196,8 @@ Status DBImpl::Get(const ReadOptions& options, mutex_.Lock(); } - if (have_stat_update && current->UpdateStats(stats)) { + if (!options_.disable_seek_compaction && + have_stat_update && current->UpdateStats(stats)) { MaybeScheduleCompaction(); } mem->Unref(); diff --git a/db/version_set.cc b/db/version_set.cc index 337e259f3..d01423ada 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1392,7 +1392,7 @@ Compaction* VersionSet::PickCompaction() { // Wrap-around to the beginning of the key space c->inputs_[0].push_back(current_->files_[level][0]); } - } else if (seek_compaction && !options_->disable_seek_compaction) { + } else if (seek_compaction) { level = current_->file_to_compact_level_; c = new Compaction(level, MaxFileSizeForLevel(level), MaxGrandParentOverlapBytes(level), NumberLevels());