encode_delete_at_attr(delete_at, attrs);
- if (!s->system_request) { // no quota enforcement for system requests
+ uint64_t obj_size = 0;
+ {
// get src object size (cached in obj_ctx from verify_permission())
RGWObjState* astate = nullptr;
op_ret = src_object->get_obj_state(this, s->obj_ctx, *src_bucket, &astate,
if (op_ret < 0) {
return;
}
- // enforce quota against the destination bucket owner
- op_ret = dest_bucket->check_quota(user_quota, bucket_quota,
+ obj_size = astate->size;
+
+ if (!s->system_request) { // no quota enforcement for system requests
+ // enforce quota against the destination bucket owner
+ op_ret = dest_bucket->check_quota(user_quota, bucket_quota,
astate->accounted_size, y);
- if (op_ret < 0) {
- return;
+ if (op_ret < 0) {
+ return;
+ }
}
}
s->yield);
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, mtime, etag, event_type, res, this);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), obj_size, mtime, etag, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here