mirror of
https://github.com/ceph/ceph
synced 2025-01-02 09:02:34 +00:00
Merge pull request #19582 from qrGitHub/wip-rgw-redundant-readingAttrs
rgw: remove get_system_obj_attrs in function RGWDeleteLC::execute and RGWDeleteCORS::execute Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
4032b1a4fe
@ -4933,16 +4933,7 @@ void RGWPutLC::execute()
|
|||||||
|
|
||||||
void RGWDeleteLC::execute()
|
void RGWDeleteLC::execute()
|
||||||
{
|
{
|
||||||
bufferlist bl;
|
map<string, bufferlist> attrs = s->bucket_attrs;
|
||||||
map<string, bufferlist> attrs;
|
|
||||||
map<string, bufferlist>::iterator iter;
|
|
||||||
rgw_raw_obj obj;
|
|
||||||
store->get_bucket_instance_obj(s->bucket, obj);
|
|
||||||
store->set_prefetch_data(s->obj_ctx, obj);
|
|
||||||
op_ret = get_system_obj_attrs(store, s, obj, attrs, NULL, &s->bucket_info.objv_tracker);
|
|
||||||
if (op_ret < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
attrs.erase(RGW_ATTR_LC);
|
attrs.erase(RGW_ATTR_LC);
|
||||||
op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,
|
op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,
|
||||||
&s->bucket_info.objv_tracker);
|
&s->bucket_info.objv_tracker);
|
||||||
@ -5040,21 +5031,13 @@ void RGWDeleteCORS::execute()
|
|||||||
if (op_ret < 0)
|
if (op_ret < 0)
|
||||||
return op_ret;
|
return op_ret;
|
||||||
|
|
||||||
rgw_raw_obj obj;
|
|
||||||
if (!cors_exist) {
|
if (!cors_exist) {
|
||||||
dout(2) << "No CORS configuration set yet for this bucket" << dendl;
|
dout(2) << "No CORS configuration set yet for this bucket" << dendl;
|
||||||
op_ret = -ENOENT;
|
op_ret = -ENOENT;
|
||||||
return op_ret;
|
return op_ret;
|
||||||
}
|
}
|
||||||
store->get_bucket_instance_obj(s->bucket, obj);
|
|
||||||
store->set_prefetch_data(s->obj_ctx, obj);
|
|
||||||
map<string, bufferlist> attrs;
|
|
||||||
map<string, bufferlist>::iterator iter;
|
|
||||||
|
|
||||||
op_ret = get_system_obj_attrs(store, s, obj, attrs, NULL, &s->bucket_info.objv_tracker);
|
|
||||||
if (op_ret < 0)
|
|
||||||
return op_ret;
|
|
||||||
|
|
||||||
|
map<string, bufferlist> attrs = s->bucket_attrs;
|
||||||
attrs.erase(RGW_ATTR_CORS);
|
attrs.erase(RGW_ATTR_CORS);
|
||||||
op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,
|
op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,
|
||||||
&s->bucket_info.objv_tracker);
|
&s->bucket_info.objv_tracker);
|
||||||
|
Loading…
Reference in New Issue
Block a user