From: Yehuda Sadeh Date: Tue, 27 Jan 2015 01:31:10 +0000 (-0800) Subject: rgw-admin: set explicit "null" instance when needed X-Git-Tag: v0.93~156^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1859239347ded50ff5e77404ae4104c0fba5013b;p=ceph.git rgw-admin: set explicit "null" instance when needed When clearing a bucket, if instance is not found, set it to "null", otherwise we'll just create a delete marker. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index c60659e3221d..7cfc7dec7370 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -372,6 +372,10 @@ int rgw_remove_object(RGWRados *store, RGWBucketInfo& bucket_info, rgw_bucket& b { RGWObjectCtx rctx(store); + if (key.instance.empty()) { + key.instance = "null"; + } + rgw_obj obj(bucket, key); int ret = store->delete_obj(rctx, bucket_info, obj, bucket_info.versioning_status());