]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw lc: use marker for the shard id
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 5 Mar 2019 09:46:23 +0000 (10:46 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Tue, 5 Mar 2019 09:46:23 +0000 (10:46 +0100)
Since buckets can undergo resharding which changes the bucket id, using the
bucket marker in the shard id can help prevent the need to rewrite the entry as
the buckets get resharded. This also helps detect the exit criteria when the
bucket gets deleted.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_lc.cc

index 268faf053ec7fcb3bc134be5857476b3e3481ece..2a779be0e4602ee0e01da5fac1c4ee7a127474ce 100644 (file)
@@ -1305,7 +1305,7 @@ template<typename F>
 static int guard_lc_modify(RGWRados* store, const rgw_bucket& bucket, const string& cookie, const F& f) {
   CephContext *cct = store->ctx();
 
-  string shard_id = bucket.tenant + ':' + bucket.name + ':' + bucket.bucket_id;  
+  string shard_id = bucket.tenant + ':' + bucket.name + ':' + bucket.marker;
 
   string oid; 
   get_lc_oid(cct, shard_id, &oid);