mirror of https://github.com/facebook/rocksdb.git
Fixed a segfault when compaction fails
Summary: We've hit it today. Test Plan: `make -j check`; didn't reproduce the issue Reviewers: yhchiang Reviewed By: yhchiang Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D54219
This commit is contained in:
parent
2f084d39b9
commit
44371501f0
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue