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: add support for noncurrentversion expiration in s3 lifecycle. #13385
Conversation
@yehudasa @cbodley @mattbenjamin, please help to review, thanks |
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 good. Just the one idiom that should be cleaned up.
src/rgw/rgw_lc.cc
Outdated
bool remove_indeed = true; | ||
int expiration; | ||
for (auto obj_iter = objs.begin(); obj_iter != objs.end(); ++obj_iter) { | ||
if ((*obj_iter).is_current()) { |
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.
Rather than (*obj_iter).foo, can you use obj_iter->foo
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.
@dang Done.
teuthology run was clean (only failures were selinux related) |
Fixes: http://tracker.ceph.com/issues/18916 Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
638a1cb
to
2c3a769
Compare
@dang I've changed to '->'. |
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 good.
Add the support for the non-current object version's expiration. This works if the bucket's versioning status is enabled or suspended.
S3's doc about the expiration: http://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html
Fixes: http://tracker.ceph.com/issues/18916
Signed-off-by: Zhang Shaowen zhangshaowen@cmss.chinamobile.com