rgw: fix bug deleting a non-existent object also generates a delete marker#48400
rgw: fix bug deleting a non-existent object also generates a delete marker#48400
Conversation
ivancich
left a comment
There was a problem hiding this comment.
I'm also wondering if this is where we should code this. I have a merged PR where we would not add a delete marker after an existing delete marker (see: https://github.com/ceph/ceph/pull/41897/files). There is existing code is src/cls/rgw/cls_rgw.cc in function rgw_bucket_link_olh, which loads in the OLH. In this area (
Line 1763 in ee321e8
And that would put this adjacent to the stacked delete marker checks.
What do you think?
kxkxk
left a comment
There was a problem hiding this comment.
I modified this part of the code so that the function is called correctly. My intention is that the bucket does not create delete markers for objects that are not created. This will be achieved by determining whether OLH exists or not.
src/cls/rgw/cls_rgw.cc
Outdated
| return ret; | ||
| } | ||
|
|
||
| // if the OLH not exist, error out |
There was a problem hiding this comment.
Maybe add "does" as in "if the OLH does not exist, error out".
|
I just realized this is 10 commits. Are you familiar with how to squash all this down to a single commit? If you'd like some guidance, just let me know. I've added a DNM (do not merge) tag so prevent merge until the squash. But QA can proceed. Also when you're down to one commit, it needs to be signed, as the CI is currently complaining about an unsigned commit. Thanks! |
Got it. |
124ad2a to
0d6787d
Compare
0d6787d to
d0193ac
Compare
Great, thank you. I don't know which method you used, but my tool for this is |
|
@kxkxk, I updated the tracker for backports to quincy and pacific. Please edit if you think it should be different. Thanks! |
It is available on both versions. |
|
this failed qa on the s3test case test_versioning_multi_object_delete_with_marker_create: i tested amazon's behavior with the following boto script, and see that they allow this creation of delete markers: client.delete_object(Bucket='test-nonexistent-delete-marker', Key='nonexistent-key')
response = client.list_object_versions(Bucket='test-nonexistent-delete-marker')
print(response['DeleteMarkers'])
|
It should be that I misunderstood the AWS API documentation related to this. I don't understand the point of creating delete markers for non-existent objects. Maybe we should keep pace with Amazon? |
|
@kxkxk, mind checking something semi-related to this issue for me? |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
fix:https://tracker.ceph.com/issues/56992
Signed-off-by: Yuxuan Yang xuanyu.yang@sincerecloud.com
I don't think rgw should create a delete marker for a non-existent object
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows