diff --git a/db/db_impl.cc b/db/db_impl.cc index 3745eaab18..cf8b17bb01 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1849,7 +1849,6 @@ Status DBImpl::CompactFilesImpl( c->column_family_data(), job_context, *c->mutable_cf_options()); } c->ReleaseCompactionFiles(s); - c.reset(); if (status.ok()) { // Done @@ -1865,6 +1864,8 @@ Status DBImpl::CompactFilesImpl( } } + c.reset(); + bg_compaction_scheduled_--; if (bg_compaction_scheduled_ == 0) { bg_cv_.SignalAll();