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 (#52)
  • Loading branch information
bgy217 authored Mar 19, 2024
1 parent 69e6b1b commit b1eeec5
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 b1eeec5

Please sign in to comment.