Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix status overrided by mistake #111

Merged
merged 3 commits into from
Nov 19, 2019
Merged
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
20 changes: 14 additions & 6 deletions src/blob_gc_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,20 @@ Status BlobGCJob::InstallOutputBlobFiles() {
to_delete_files.append(std::to_string(builder.first->GetNumber()));
handles.emplace_back(std::move(builder.first));
}
ROCKS_LOG_BUFFER(
log_buffer_,
"[%s] InstallOutputBlobFiles failed. Delete GC output files: %s",
blob_gc_->column_family_handle()->GetName().c_str(),
to_delete_files.c_str());
s = blob_file_manager_->BatchDeleteFiles(handles);
ROCKS_LOG_BUFFER(log_buffer_,
"[%s] InstallOutputBlobFiles failed. Delete GC output "
"files: %s",
blob_gc_->column_family_handle()->GetName().c_str(),
to_delete_files.c_str());
// Do not set status `s` here, cause it may override the non-okay-status of
// `s` so that in the outer funcation it will rewrite blob indexes to LSM by
// mistake.
Status status = blob_file_manager_->BatchDeleteFiles(handles);
if (!status.ok()) {
ROCKS_LOG_WARN(db_options_.info_log,
"Delete GC output files[%s] failed: %s",
to_delete_files.c_str(), status.ToString().c_str());
}
}
return s;
}
Expand Down