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,20 +3318,22 @@ 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());
|
||||||
status = ProcessKeyValueCompaction(
|
if (status.ok()) {
|
||||||
mutable_cf_options,
|
status = ProcessKeyValueCompaction(
|
||||||
is_snapshot_supported,
|
mutable_cf_options,
|
||||||
visible_at_tip,
|
is_snapshot_supported,
|
||||||
earliest_snapshot,
|
visible_at_tip,
|
||||||
latest_snapshot,
|
earliest_snapshot,
|
||||||
deletion_state,
|
latest_snapshot,
|
||||||
bottommost_level,
|
deletion_state,
|
||||||
imm_micros,
|
bottommost_level,
|
||||||
input.get(),
|
imm_micros,
|
||||||
compact,
|
input.get(),
|
||||||
true,
|
compact,
|
||||||
&num_output_records,
|
true,
|
||||||
log_buffer);
|
&num_output_records,
|
||||||
|
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