From ec5fa45ad226328c35628417f4085f339c9d8bb7 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Thu, 23 Nov 2023 05:56:00 +0000 Subject: [PATCH] rgw/sfs: rm dangling multipart final build file Signed-off-by: Joao Eduardo Luis --- src/rgw/driver/sfs/multipart.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rgw/driver/sfs/multipart.cc b/src/rgw/driver/sfs/multipart.cc index 39b7bf72a176a..523ba6cf9d20a 100644 --- a/src/rgw/driver/sfs/multipart.cc +++ b/src/rgw/driver/sfs/multipart.cc @@ -18,6 +18,7 @@ #include #include +#include #include #include "rgw/driver/sfs/fmt.h" @@ -441,12 +442,14 @@ int SFSMultipartUploadV2::complete( bucketref->get_bucket_id(), mp->object_name, e.what() ) << dendl; + std::filesystem::remove(objpath, ec); return -ERR_INTERNAL_ERROR; } if (!objref) { // We were unable to create a version, but this might very well have been // because we conflicted with another in-flight transaction. Lets return // back to the user, and they can complete it again if they so desire. + std::filesystem::remove(objpath, ec); return -ERR_INTERNAL_ERROR; } auto destpath = store->get_data_path() / objref->get_storage_path(); @@ -462,6 +465,7 @@ int SFSMultipartUploadV2::complete( destpath, ec.message() ) << dendl; + std::filesystem::remove(objpath, ec); return -ERR_INTERNAL_ERROR; } @@ -473,6 +477,7 @@ int SFSMultipartUploadV2::complete( objpath, destpath, cpp_strerror(errno) ) << dendl; + std::filesystem::remove(objpath, ec); return -ERR_INTERNAL_ERROR; }