New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RGW: Multipart upload may double the quota #17959
Conversation
src/rgw/rgw_rados.cc
Outdated
* Returns: 0 on success, -ERR# otherwise. | ||
*/ | ||
int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_size, | ||
map<string, bufferlist>& attrs, | ||
bool assume_noent, bool modify_tail, | ||
void *_index_op) | ||
void *_index_op, bool completeMultipart) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaosibei is it possible accounted_size could be corrected by the call path leading to _do_write_meta?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the accounted_size could not be corected outside of the _do_write_meta. Because, the accounted_size is both used in quota status and index_op.
at the rgw_rados.cc:6940 (_do_write_meta)
r = index_op->complete(poolid, epoch, size, accounted_size,...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaosibei No, that's not the tracker for this PR. |
sorry The tracker issue is http://tracker.ceph.com/issues/21586 |
5a85520
to
97f95e4
Compare
Fixes: http://tracker.ceph.com/issues/21586 Signed-off-by: Sibei Gao <gaosb@inspur.com>
@mattbenjamin @mdw-at-linuxbox I think that the accounted_size could not be corected outside of the _do_write_meta. Because, the accounted_size is both used in quota status and index_op. at the rgw_rados.cc (_do_write_meta)
Now, I give a new commit which seems better than before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the tracker issue is fixed. I tried this out and verified it works.
Tracker issue matches now - so I think your change was made.
@mattbenjamin @mdw-at-linuxbox i am marking the tracker ticket with "backport=jewel,luminous" after checking jewel and luminous branches. does it make sense to you guys? |
When user upload object using multipart api, they may upload failed. The reason is that the object size is added twice to quota stats.
Fixes: http://tracker.ceph.com/issues/21586
Signed-off-by: Sibei Gao gaosb@inspur.com