]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: multi object delete should be idempotent
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 12 Feb 2014 00:54:05 +0000 (16:54 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 20 Feb 2014 17:25:04 +0000 (09:25 -0800)
Fixes: #7346
When doing a multi object delete, if an object does not exist then we
should return a success code for that object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 8ca3d95bf633ea9616852cec74f02285a03071d5)

Conflicts:
src/rgw/rgw_op.cc

src/rgw/rgw_op.cc

index 25af50fe2386db62e8b7868e4b0ccb8fff73a700..c9601f90dbbca9ed4c7d77bb1e7c7b904d57b15a 100644 (file)
@@ -2538,6 +2538,9 @@ void RGWDeleteMultiObj::execute()
     rgw_obj obj(bucket,(*iter));
     store->set_atomic(s->obj_ctx, obj);
     ret = store->delete_obj(s->obj_ctx, obj);
+    if (ret == -ENOENT) {
+      ret = 0;
+    }
     result = make_pair(*iter, ret);
 
     send_partial_response(result);