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: v12.2.13~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc4e24f82899871c53cbb96e36c7de971faf6d24;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 Conflicts: src/rgw/rgw_lc.cc - master is using new utility to get the shard_id. backporting this utility will introduce large code dependency --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 7a02556d32be..e2c99aeb6fa8 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -4957,7 +4957,7 @@ void RGWPutLC::execute() op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker); if (op_ret < 0) return; - string shard_id = s->bucket.tenant + ':' + s->bucket.name + ':' + s->bucket.bucket_id; + string shard_id = s->bucket.tenant + ':' + s->bucket.name + ':' + s->bucket.marker; string oid; get_lc_oid(s, oid); pair entry(shard_id, lc_uninitial);