Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
rgw/sfs: rm dangling multipart final build file
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Eduardo Luis <joao@suse.com>
  • Loading branch information
jecluis committed Nov 23, 2023
1 parent c622ab0 commit ec5fa45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rgw/driver/sfs/multipart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <stdio.h>
#include <unistd.h>

#include <filesystem>
#include <fstream>

#include "rgw/driver/sfs/fmt.h"
Expand Down Expand Up @@ -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();
Expand All @@ -462,6 +465,7 @@ int SFSMultipartUploadV2::complete(
destpath, ec.message()
)
<< dendl;
std::filesystem::remove(objpath, ec);
return -ERR_INTERNAL_ERROR;
}

Expand All @@ -473,6 +477,7 @@ int SFSMultipartUploadV2::complete(
objpath, destpath, cpp_strerror(errno)
)
<< dendl;
std::filesystem::remove(objpath, ec);
return -ERR_INTERNAL_ERROR;
}

Expand Down

0 comments on commit ec5fa45

Please sign in to comment.