Bug #43066
opencopy object (key) overhead user quota and bucket quota
0%
Description
Hi all.
Currently i upload a file to bucket which has quota
"user_quota": { "enabled": true, "check_on_raw": false, "max_size": 10737418240, "max_size_kb": 10485760, "max_objects": -1 },
current usage
"rgw.main": { "size": 18431279469, "size_actual": 18431307776, "size_utilized": 18431279469, "size_kb": 17999297, "size_kb_actual": 17999324, "size_kb_utilized": 17999297, "num_objects": 9 },
after copy file to same bucket
"rgw.main": { "size": 20735185956, "size_actual": 20735217664, "size_utilized": 20735185956, "size_kb": 20249206, "size_kb_actual": 20249236, "size_kb_utilized": 20249206, "num_objects": 10 },
Thanks.
Updated by Daniel Gryniewicz over 4 years ago
- Status changed from New to Need More Info
- Assignee deleted (
Daniel Gryniewicz)
Can you be more specific about what OP you're running? The info you gave is a bit confusing, and I'm not sure exactly what's going on. Did you mean to paste a bucket quota rather than a user quota?
Updated by hoan nv over 4 years ago
Daniel Gryniewicz wrote:
Can you be more specific about what OP you're running? The info you gave is a bit confusing, and I'm not sure exactly what's going on. Did you mean to paste a bucket quota rather than a user quota?
I set user quota to to test user with max-size option : "max_size": 10737418240, but i can copy many objects. Total size of user bigger than user and bucket quota.
I thinks it can fix with add this code to function : void RGWCopyObj::execute() on rgw_op.cc file
```
op_ret = store->check_quota(dest_bucket_info.owner.id, dest_bucket,
user_quota, bucket_quota, s->content_length);
if (op_ret < 0) {
ldpp_dout(this, 20) << "check_quota() returned ret=" << op_ret << dendl;
return;
}
op_ret = store->check_bucket_shards(dest_bucket_info, dest_bucket, bucket_quota);
if (op_ret < 0) {
ldpp_dout(this, 20) << "check_bucket_shards() returned ret=" << op_ret << dendl;
return;
}
```
Updated by Casey Bodley over 4 years ago
- Status changed from Need More Info to New
- Tags set to quota