mirror of
https://github.com/ceph/ceph
synced 2025-01-11 21:50:26 +00:00
rgw: tmp objects can be removed async
This commit is contained in:
parent
6b9817af8d
commit
53695134a6
@ -741,7 +741,7 @@ void RGWPutObj::execute()
|
||||
if (ret < 0)
|
||||
goto done_err;
|
||||
if (created_obj) {
|
||||
ret = rgwstore->delete_obj(s->obj_ctx, s->user.user_id, obj);
|
||||
ret = rgwstore->delete_obj(NULL, s->user.user_id, obj, false);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
}
|
||||
|
@ -803,6 +803,11 @@ int RGWRados::delete_obj_impl(void *ctx, std::string& id, rgw_obj& obj, bool syn
|
||||
if (r < 0)
|
||||
return r;
|
||||
r = io_ctx.operate(oid, &op);
|
||||
|
||||
if (r >= 0 && bucket.marker.size()) {
|
||||
uint64_t epoch = io_ctx.get_last_version();
|
||||
r = complete_update_index_del(bucket, obj.object, tag, epoch);
|
||||
}
|
||||
} else {
|
||||
librados::AioCompletion *completion = rados->aio_create_completion(NULL, NULL, NULL);
|
||||
r = io_ctx.aio_operate(obj.object, completion, &op);
|
||||
@ -811,11 +816,6 @@ int RGWRados::delete_obj_impl(void *ctx, std::string& id, rgw_obj& obj, bool syn
|
||||
|
||||
atomic_write_finish(state, r);
|
||||
|
||||
if (r >= 0 && bucket.marker.size()) {
|
||||
uint64_t epoch = io_ctx.get_last_version();
|
||||
r = complete_update_index_del(bucket, obj.object, tag, epoch);
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user