diff --git a/db/db_impl.cc b/db/db_impl.cc index 52c538277..cc17e743d 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1842,7 +1842,7 @@ void DBImpl::MaybeScheduleFlushOrCompaction() { // memtable flush needed bg_flush_scheduled_++; env_->Schedule(&DBImpl::BGWorkFlush, this, Env::Priority::HIGH); - } else { + } else if (options_.max_background_flushes > 0) { bg_schedule_needed_ = true; } }