From cc4e24f82899871c53cbb96e36c7de971faf6d24 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Tue, 5 Mar 2019 10:46:23 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 7a02556d32be1..e2c99aeb6fa86 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); -- 2.39.5