]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw lc: use marker for the shard id 29122/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 5 Mar 2019 09:46:23 +0000 (10:46 +0100)
committerDongdong Tao <dongdong.tao@canonical.com>
Thu, 1 Aug 2019 15:52:35 +0000 (15:52 +0000)
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

src/rgw/rgw_op.cc

index 7a02556d32be14f576ecccbe1a86f446ed0841f1..e2c99aeb6fa8639c93380666eb023e6ef628db88 100644 (file)
@@ -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<string, int> entry(shard_id, lc_uninitial);