From 8ca3d95bf633ea9616852cec74f02285a03071d5 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 11 Feb 2014 16:54:05 -0800 Subject: [PATCH] rgw: multi object delete should be idempotent 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 --- src/rgw/rgw_op.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 3f8dbf31c851..a713285b5093 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2878,6 +2878,9 @@ void RGWDeleteMultiObj::execute() rgw_obj obj(bucket,(*iter)); store->set_atomic(s->obj_ctx, obj); ret = store->delete_obj(s->obj_ctx, s->bucket_owner.get_id(), obj); + if (ret == -ENOENT) { + ret = 0; + } result = make_pair(*iter, ret); send_partial_response(result); -- 2.47.3