rgw: tmp objects can be removed async

This commit is contained in:
Yehuda Sadeh 2011-09-23 22:36:26 -07:00
parent 6b9817af8d
commit 53695134a6
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;