Skip to content

Commit 2fb1fea

Browse files
committed
Fix syncronization issues
1 parent ff76895 commit 2fb1fea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/db_impl.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@ Status DBImpl::WriteLevel0Table(ColumnFamilyData* cfd,
15591559
// threads could be concurrently producing compacted files for
15601560
// that key range.
15611561
if (base != nullptr && db_options_.max_background_compactions <= 1 &&
1562+
db_options_.max_background_flushes == 0 &&
15621563
cfd->ioptions()->compaction_style == kCompactionStyleLevel) {
15631564
level = base->PickLevelForMemTableOutput(min_user_key, max_user_key);
15641565
}
@@ -1913,7 +1914,6 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
19131914
bg_cv_.Wait();
19141915
} else {
19151916
manual_compaction_ = &manual;
1916-
assert(bg_compaction_scheduled_ == 0);
19171917
bg_compaction_scheduled_++;
19181918
env_->Schedule(&DBImpl::BGWorkCompaction, this, Env::Priority::LOW);
19191919
}

0 commit comments

Comments
 (0)