Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/blob_gc_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ Status BlobGCJob::DoRunGC() {
// uint64_t total_entry_num = 0;
// uint64_t total_entry_size = 0;

uint64_t file_size = 0;

std::string last_key;
bool last_key_valid = false;
gc_iter->SeekToFirst();
Expand Down Expand Up @@ -203,9 +201,10 @@ Status BlobGCJob::DoRunGC() {

// Rewrite entry to new blob file
if ((!blob_file_handle && !blob_file_builder) ||
file_size >= blob_gc_->titan_cf_options().blob_file_target_size) {
if (file_size >= blob_gc_->titan_cf_options().blob_file_target_size) {
assert(blob_file_builder);
(blob_file_handle->GetFile()->GetFileSize() >=
blob_gc_->titan_cf_options().blob_file_target_size)) {
if ((blob_file_handle->GetFile()->GetFileSize() >=
blob_gc_->titan_cf_options().blob_file_target_size)) {
assert(blob_file_handle);
assert(blob_file_builder->status().ok());
blob_file_builders_.emplace_back(std::make_pair(
Expand All @@ -222,7 +221,6 @@ Status BlobGCJob::DoRunGC() {
blob_file_builder = std::unique_ptr<BlobFileBuilder>(
new BlobFileBuilder(db_options_, blob_gc_->titan_cf_options(),
blob_file_handle->GetFile()));
file_size = 0;
}
assert(blob_file_handle);
assert(blob_file_builder);
Expand Down