Fixed a possible bug in DoCompactionWork
Summary: There are two statuses in DoCompactionWork could be hidden. This path fix this bug. This seems to be a bug since CompactionFilterV2 is introduced: https://github.com/facebook/rocksdb/blame/3.6.fb/db/db_impl.cc#L3294 Test Plan: make Reviewers: nkg-, igor, sdong Reviewed By: igor, sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D28989
This commit is contained in:
parent
b11a617acd
commit
edd6100e2b
@ -3305,6 +3305,9 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
|
|||||||
true,
|
true,
|
||||||
&num_output_records,
|
&num_output_records,
|
||||||
log_buffer);
|
log_buffer);
|
||||||
|
if (!status.ok()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
compact->CleanupBatchBuffer();
|
compact->CleanupBatchBuffer();
|
||||||
compact->CleanupMergedBuffer();
|
compact->CleanupMergedBuffer();
|
||||||
@ -3315,6 +3318,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
|
|||||||
CallCompactionFilterV2(compact, compaction_filter_v2);
|
CallCompactionFilterV2(compact, compaction_filter_v2);
|
||||||
}
|
}
|
||||||
compact->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
compact->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
||||||
|
if (status.ok()) {
|
||||||
status = ProcessKeyValueCompaction(
|
status = ProcessKeyValueCompaction(
|
||||||
mutable_cf_options,
|
mutable_cf_options,
|
||||||
is_snapshot_supported,
|
is_snapshot_supported,
|
||||||
@ -3329,6 +3333,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
|
|||||||
true,
|
true,
|
||||||
&num_output_records,
|
&num_output_records,
|
||||||
log_buffer);
|
log_buffer);
|
||||||
|
}
|
||||||
} // checking for compaction filter v2
|
} // checking for compaction filter v2
|
||||||
|
|
||||||
if (status.ok() && (shutting_down_.Acquire_Load() || cfd->IsDropped())) {
|
if (status.ok() && (shutting_down_.Acquire_Load() || cfd->IsDropped())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user