Skip to content

Commit

Permalink
Fix syncronization issues
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcanadi committed Sep 18, 2014
1 parent ff76895 commit 2fb1fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,7 @@ Status DBImpl::WriteLevel0Table(ColumnFamilyData* cfd,
// threads could be concurrently producing compacted files for
// that key range.
if (base != nullptr && db_options_.max_background_compactions <= 1 &&
db_options_.max_background_flushes == 0 &&
cfd->ioptions()->compaction_style == kCompactionStyleLevel) {
level = base->PickLevelForMemTableOutput(min_user_key, max_user_key);
}
Expand Down Expand Up @@ -1913,7 +1914,6 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
bg_cv_.Wait();
} else {
manual_compaction_ = &manual;
assert(bg_compaction_scheduled_ == 0);
bg_compaction_scheduled_++;
env_->Schedule(&DBImpl::BGWorkCompaction, this, Env::Priority::LOW);
}
Expand Down

0 comments on commit 2fb1fea

Please sign in to comment.