]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: make object removal atomic in rgw-object-expirer.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Mon, 25 May 2015 15:55:09 +0000 (17:55 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 27 Aug 2015 17:40:10 +0000 (10:40 -0700)
Fixes: #4099
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_object_expirer.cc

index 5f29afcb14deb4212a6c26108584969081dc09ab..97b5a27e58d736b707b2cb8ae66d5a66ae4c0e37 100644 (file)
@@ -81,7 +81,6 @@ static int garbage_single_object(objexp_hint_entry& hint)
     return ret;
   }
 
-  /* TODO: check whether the hint is actual. */
   RGWObjectCtx rctx(store);
 
   rgw_obj_key key = hint.obj_key;
@@ -90,6 +89,7 @@ static int garbage_single_object(objexp_hint_entry& hint)
   }
 
   rgw_obj obj(bucket_info.bucket, key);
+  store->set_atomic(&rctx, obj);
   ret = store->delete_obj(rctx, bucket_info, obj,
           bucket_info.versioning_status(), 0, hint.exp_time);