From 578b5764d5b26d190c295da88c1be5f0c77682a7 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 24 Oct 2012 13:15:46 -0700 Subject: [PATCH] rgw: fix multipart overwrite Fixes: #3400 Removed a few lines of code that prematurely created the head part of the final object (before creating the manifest). backport:argonaut Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_op.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index c092a295ec9ac..c792053dc724f 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1585,10 +1585,6 @@ void RGWCompleteMultipart::execute() attrs[RGW_ATTR_ETAG] = etag_bl; target_obj.init(s->bucket, s->object_str); - rgwstore->set_atomic(s->obj_ctx, target_obj); - ret = rgwstore->put_obj_meta(s->obj_ctx, target_obj, 0, NULL, attrs, RGW_OBJ_CATEGORY_MAIN, false, NULL, NULL, NULL); - if (ret < 0) - goto done; for (obj_iter = obj_parts.begin(); obj_iter != obj_parts.end(); ++obj_iter) { string oid = mp.get_part(obj_iter->second.num); -- 2.39.5