Project

General

Profile

Actions

Bug #56992

open

rgw_op.cc:Deleting a non-existent object also generates a delete marker

Added by yuxuan yang almost 2 years ago. Updated over 1 year ago.

Status:
Fix Under Review
Priority:
Normal
Target version:
% Done:

0%

Source:
Tags:
Backport:
quincy, pacific
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I use s3 api to delete objects that do not exist in the bucket with version control enabled (the object name is randomly generated), and rgw generates a delete mark for this object.It seems that delete markers and non-existing objects are the same for rgw.I don't think this is a normal situation.
So I have made some modifications to the code as follows, and I would like to know if this works.

in rgw_op.cc line 4852

if(s->bucket->get_info().versioning_enabled()&&!s->object->have_instance()){
rgw_bucket_olh_entry olh;
op_ret = store->getRados()->bi_get_olh(this,s->bucket->get_info(),s->object->get_obj(),&olh);
if(op_ret < 0) return;
}
Actions

Also available in: Atom PDF