]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: set explicit "null" instance when needed
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 27 Jan 2015 01:31:10 +0000 (17:31 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Jan 2015 17:31:34 +0000 (09:31 -0800)
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 <yehuda@redhat.com>
src/rgw/rgw_bucket.cc

index c60659e3221d4bfa5524865c99a0d67f36da0a47..7cfc7dec7370946756220edc6036e575e5094636 100644 (file)
@@ -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());