]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: drop entries only if the markers do not match.
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 5 Mar 2019 08:30:57 +0000 (09:30 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 12 Apr 2019 16:08:27 +0000 (18:08 +0200)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 3a5647f748185e3a3fc2602a132874c0dfb24368)

src/rgw/rgw_lc.cc

index 8abb73a27a91da20df526c14da42b374fb38e65a..268faf053ec7fcb3bc134be5857476b3e3481ece 100644 (file)
@@ -952,16 +952,17 @@ int RGWLC::bucket_lc_process(string& shard_id)
   boost::split(result, shard_id, boost::is_any_of(":"));
   string bucket_tenant = result[0];
   string bucket_name = result[1];
-  string bucket_id = result[2];
+  string bucket_marker = result[2];
   int ret = store->get_bucket_info(obj_ctx, bucket_tenant, bucket_name, bucket_info, NULL, &bucket_attrs);
   if (ret < 0) {
     ldpp_dout(this, 0) << "LC:get_bucket_info for " << bucket_name << " failed" << dendl;
     return ret;
   }
 
-  ret = bucket_info.bucket.bucket_id.compare(bucket_id) ;
-  if (ret != 0) {
-    ldpp_dout(this, 0) << "LC:old bucket id found. " << bucket_name << " should be deleted" << dendl;
+  if (bucket_info.bucket.marker != bucket_marker) {
+    ldpp_dout(this, 1) << "LC: deleting stale entry found for bucket=" << bucket_tenant
+                       << ":" << bucket_name << " cur_marker=" << bucket_info.bucket.marker
+                       << " orig_marker=" << bucket_marker << dendl;
     return -ENOENT;
   }