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

Commit

Permalink
rgw/sfs: handle result from metadata update
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Nov 23, 2023
1 parent ec5fa45 commit 15dba00
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rgw/driver/sfs/multipart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ int SFSMultipartUploadV2::complete(
.delete_at = ceph::real_time()}
);
try {
objref->metadata_finish(store, bucketref->get_info().versioning_enabled());
res = objref->metadata_finish(
store, bucketref->get_info().versioning_enabled()
);
} catch (const std::system_error& e) {
lsfs_err(dpp) << fmt::format(
"failed to update db object {}: {}", objref->name,
Expand All @@ -519,6 +521,11 @@ int SFSMultipartUploadV2::complete(
<< dendl;
return -ERR_INTERNAL_ERROR;
}
if (!res) {
lsfs_err(dpp) << fmt::format("failed to update db object {}", objref->name)
<< dendl;
return -ERR_INTERNAL_ERROR;
}

// mark multipart upload done
res = mpdb.mark_done(upload_id);
Expand Down

0 comments on commit 15dba00

Please sign in to comment.