From ca2ea2f8398e82aa56aab9250cfab1004b49394f Mon Sep 17 00:00:00 2001 From: bgy217 Date: Tue, 19 Mar 2024 14:06:52 +0900 Subject: [PATCH] rgw/rgw_op: fix bug that multiObjectDelete request including locked object do not response --- src/rgw/rgw_op.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 53c05263d242f..8e6702c155432 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -6609,6 +6609,7 @@ void RGWDeleteMultiObj::execute() RGWMultiDelXMLParser parser; RGWObjectCtx *obj_ctx = static_cast(s->obj_ctx); + std::vector run_objects; map result_map; char* buf; @@ -6729,6 +6730,7 @@ void RGWDeleteMultiObj::execute() RGWRados::Object* del_target = new RGWRados::Object(store->getRados(), s->bucket_info, *obj_ctx, obj); RGWRados::Object::Delete* del_op = new RGWRados::Object::Delete(del_target); + run_objects.push_back(obj.key); tod_pool->run(s, store, del_op, &result_map, &mu_mutex); } @@ -6737,7 +6739,7 @@ void RGWDeleteMultiObj::execute() op_ret = 0; wrap_up: - for (iter = multi_delete->objects.begin(); iter != multi_delete->objects.end(); ++iter) { + for (iter = run_objects.begin(); iter != run_objects.end(); ++iter) { rgw_obj_key each_obj_key = *iter; map::iterator found;