Skip to content

Commit

Permalink
rgw/rgw_op: fix bug that multiObjectDelete request including locked o…
Browse files Browse the repository at this point in the history
…bject do not response
  • Loading branch information
bgy217 committed Mar 19, 2024
1 parent 4b18a18 commit ca2ea2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6609,6 +6609,7 @@ void RGWDeleteMultiObj::execute()
RGWMultiDelXMLParser parser;
RGWObjectCtx *obj_ctx = static_cast<RGWObjectCtx *>(s->obj_ctx);

std::vector<rgw_obj_key> run_objects;
map<rgw_obj_key, RGWRados::Object::Delete*> result_map;

char* buf;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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<rgw_obj_key, RGWRados::Object::Delete*>::iterator found;
Expand Down

0 comments on commit ca2ea2f

Please sign in to comment.