]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix multipart overwrite
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 24 Oct 2012 20:15:46 +0000 (13:15 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 6 Nov 2012 18:17:14 +0000 (10:17 -0800)
Fixes: #3400
Removed a few lines of code that prematurely created the head
part of the final object (before creating the manifest).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_op.cc

index 05038bfa9899c0c0c39df1cb35cb5afd3cc9b22d..70f3bfe426e4900e4df845ff3a8ea14c7d1fabdd 100644 (file)
@@ -1820,10 +1820,6 @@ void RGWCompleteMultipart::execute()
   attrs[RGW_ATTR_ETAG] = etag_bl;
 
   target_obj.init(s->bucket, s->object_str);
-  store->set_atomic(s->obj_ctx, target_obj);
-  ret = store->put_obj_meta(s->obj_ctx, target_obj, 0, NULL, attrs, RGW_OBJ_CATEGORY_MAIN, PUT_OBJ_CREATE, NULL, NULL, NULL, NULL);
-  if (ret < 0)
-    return;
   
   for (obj_iter = obj_parts.begin(); obj_iter != obj_parts.end(); ++obj_iter) {
     string oid = mp.get_part(obj_iter->second.num);