From d6597be60d06778a99aab637844122170d548065 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 24 Nov 2015 12:05:43 -0800 Subject: [PATCH] rgw: cancel index operation if delete got ENOENT Should mark the operation as canceled, so that sync followers don't try to apply it. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 92a6388f7f99f..5f7c8750678b2 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -6927,7 +6927,7 @@ int RGWRados::Object::Delete::delete_obj() bool removed = (r >= 0); int64_t poolid = ref.ioctx.get_id(); - if (r >= 0 || r == -ENOENT) { + if (r >= 0) { r = index_op.complete_del(poolid, ref.ioctx.get_last_version(), params.remove_objs); } else { int ret = index_op.cancel(); -- 2.39.5