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: optimize function abort_bucket_multiparts #19710
Conversation
qrGitHub
commented
Dec 28, 2017
•
edited
edited
- common_prefixes is useless, so drop it;
- RGWMPObj object is enough, so change RGWMultipartUploadEntry to RGWMPObj;
src/rgw/rgw_multi.cc
Outdated
bool is_truncated; | ||
string marker; |
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.
whystring marker
place is changed?
src/rgw/rgw_multi.cc
Outdated
if (ret < 0) { | ||
return ret; | ||
} | ||
num_deleted++; | ||
} | ||
if (num_deleted) { | ||
ldout(store->ctx(),0) << "WARNING : aborted " << num_deleted << " incomplete multipart uploads" << dendl; | ||
ldout(store->ctx(), 0) << "WARNING: aborted " << num_deleted << |
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.
no need to change this ldout
295e5b3
to
25c7718
Compare
@amitkumar50 withdraw unnecessary changes |
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.
@qrGitHub see my comment
src/rgw/rgw_multi.cc
Outdated
bool is_truncated; | ||
|
||
do { | ||
ret = list_bucket_multiparts(store, bucket_info, prefix, marker, delim, | ||
max, &objs, &common_prefixes, &is_truncated); | ||
max, &objs, NULL, &is_truncated); |
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.
@qrGitHub use nullptr
instead of NULL
* 1. common_prefixes is useless, so drop it; * 2. RGWMPObj object is enough, so change RGWMultipartUploadEntry to RGWMPObj; Signed-off-by: Bingyin Zhang <zhangbingyin@cloudin.cn>
25c7718
to
fe7d415
Compare
change NULL to nullptr |
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.
lgtm