From 0ae335298b85daba5125a3da4ad26d598c76ecab 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 (cherry picked from commit 8ca3d95bf633ea9616852cec74f02285a03071d5) Conflicts: src/rgw/rgw_op.cc --- 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 25af50fe238..c9601f90dbb 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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); -- 2.47.3