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>
(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
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<string, int> entry(shard_id, lc_uninitial);