Skip to content
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

Merged
merged 1 commit into from Feb 20, 2017

Conversation

zhangsw
Copy link
Contributor

@zhangsw zhangsw commented Feb 13, 2017

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

@idealguo
Copy link

@yehudasa @cbodley @mattbenjamin, please help to review, thanks

Copy link
Contributor

@dang dang left a 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.

bool remove_indeed = true;
int expiration;
for (auto obj_iter = objs.begin(); obj_iter != objs.end(); ++obj_iter) {
if ((*obj_iter).is_current()) {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang Done.

@cbodley
Copy link
Contributor

cbodley commented Feb 16, 2017

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>
@zhangsw
Copy link
Contributor Author

zhangsw commented Feb 17, 2017

@dang I've changed to '->'.

Copy link
Contributor

@dang dang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@dang dang merged commit acd633c into ceph:master Feb 20, 2017
@yehudasa
Copy link
Member

@zhangsw @dang we should make sure to add a test s3-tests to cover this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants