From: Abhishek Lekshmanan Date: Tue, 5 Mar 2019 09:46:23 +0000 (+0100) Subject: rgw lc: use marker for the shard id X-Git-Tag: v14.2.1~29^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=29d5f7b348497ec86b7ef4635bbc662a723ff07d;p=ceph.git rgw lc: use marker for the shard id 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 (cherry picked from commit bf64aa843febf2f09aab54f9e0a24aa44f5938ea) --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 268faf053ec7..2a779be0e460 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1305,7 +1305,7 @@ template 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);