diff --git a/src/rgw/driver/sfs/multipart.cc b/src/rgw/driver/sfs/multipart.cc index 523ba6cf9d20aa..0bf31bad92e94c 100644 --- a/src/rgw/driver/sfs/multipart.cc +++ b/src/rgw/driver/sfs/multipart.cc @@ -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, @@ -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);