Fixed a bug which could hide non-ok status in CompactionJob::Run()
Summary: Fixed a bug which could hide non-ok status in CompactionJob::Run() Test Plan: make Reviewers: sdong, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D28995
This commit is contained in:
parent
ec24bd4e6a
commit
98e59f9813
@ -385,17 +385,22 @@ Status CompactionJob::Run() {
|
|||||||
compact_->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
compact_->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
||||||
|
|
||||||
status = ProcessKeyValueCompaction(&imm_micros, input.get(), true);
|
status = ProcessKeyValueCompaction(&imm_micros, input.get(), true);
|
||||||
|
if (!status.ok()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
compact_->CleanupBatchBuffer();
|
compact_->CleanupBatchBuffer();
|
||||||
compact_->CleanupMergedBuffer();
|
compact_->CleanupMergedBuffer();
|
||||||
}
|
}
|
||||||
} // done processing all prefix batches
|
} // done processing all prefix batches
|
||||||
// finish the last batch
|
// finish the last batch
|
||||||
|
if (status.ok()) {
|
||||||
if (compact_->key_str_buf_.size() > 0) {
|
if (compact_->key_str_buf_.size() > 0) {
|
||||||
CallCompactionFilterV2(compaction_filter_v2);
|
CallCompactionFilterV2(compaction_filter_v2);
|
||||||
}
|
}
|
||||||
compact_->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
compact_->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
|
||||||
status = ProcessKeyValueCompaction(&imm_micros, input.get(), true);
|
status = ProcessKeyValueCompaction(&imm_micros, input.get(), true);
|
||||||
|
}
|
||||||
} // checking for compaction filter v2
|
} // checking for compaction filter v2
|
||||||
|
|
||||||
if (status.ok() &&
|
if (status.ok() &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user