Commit 552cebf5 authored by pingcap-github-bot's avatar pingcap-github-bot Committed by Connor

Fix status overrided by mistake (#111) (#113)

* fix status override
Signed-off-by: 's avatarConnor1996 <zbk602423539@gmail.com>
parent 43225d44
...@@ -517,12 +517,20 @@ Status BlobGCJob::InstallOutputBlobFiles() { ...@@ -517,12 +517,20 @@ Status BlobGCJob::InstallOutputBlobFiles() {
to_delete_files.append(std::to_string(builder.first->GetNumber())); to_delete_files.append(std::to_string(builder.first->GetNumber()));
handles.emplace_back(std::move(builder.first)); handles.emplace_back(std::move(builder.first));
} }
ROCKS_LOG_BUFFER( ROCKS_LOG_BUFFER(log_buffer_,
log_buffer_, "[%s] InstallOutputBlobFiles failed. Delete GC output "
"[%s] InstallOutputBlobFiles failed. Delete GC output files: %s", "files: %s",
blob_gc_->column_family_handle()->GetName().c_str(), blob_gc_->column_family_handle()->GetName().c_str(),
to_delete_files.c_str()); to_delete_files.c_str());
s = blob_file_manager_->BatchDeleteFiles(handles); // 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; return s;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment