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: can't remove shadow file when copy obj from other placement #23325
Conversation
hi, @cbodley do you mind to help review this ? thanks |
hi @mattbenjamin can you please help review this ? |
other zone placement fix https://tracker.ceph.com/issues/25168 Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
jenkins test this please |
1 similar comment
jenkins test this please |
@joke-lee sure |
@@ -8475,6 +8475,8 @@ int RGWRados::copy_obj(RGWObjectCtx& obj_ctx, | |||
} | |||
|
|||
if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */ | |||
attrs.erase(RGW_ATTR_ID_TAG); |
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.
can you explain how this works?
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.
@joke-lee I think attrs.erase(RGW_ATTR_ID_TAG)
has been done in https://github.com/ceph/ceph/blob/master/src/rgw/rgw_rados.cc#L8413
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.
So as @chuang-he says, maybe this is a repeated commit ~
the same as the #22613 |
@joke-lee so, because deleting the attr will cause a new tail tag to be generated? commit should indicate this |
same pr close now |
hi,
i create 2 placement as flow
and create 2 bucket
upload 10M file to test1 bucket
and copy test1/10M to test2/10M_copy
and remove objs
and process gc
and two shadow file will never be deleted
this will cause garbage data which nerver be delete, and only can delete by rados command
we need dose the same way like https://github.com/ceph/ceph/blob/master/src/rgw/rgw_rados.cc#L7787
fix https://tracker.ceph.com/issues/25168
Signed-off-by: root root@ylycephdev.novalocal