]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: drop dedup shared-manifest and blake3 attrs on object rewrites
authorMatthew N. Heler <matthew.heler@hotmail.com>
Wed, 10 Jun 2026 19:21:30 +0000 (14:21 -0500)
committerMatthew N. Heler <matthew.heler@hotmail.com>
Tue, 30 Jun 2026 15:22:13 +0000 (10:22 -0500)
Do not carry RGW_ATTR_SHARE_MANIFEST or RGW_ATTR_BLAKE3 when object data
or manifest ownership is rewritten through admin rewrite, remote fetch,
CopyObject, or lifecycle transition.

Both attributes describe RGW dedup state for an existing RADOS layout:
the shared-manifest marker and the blake3 digest of the object's on-disk
bytes. Once a path writes a new layout or creates a new destination head
with its own refcount tag, preserving them leaves stale dedup on the
destination.

Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
src/rgw/driver/rados/rgw_rados.cc

index 151aca42d2e629973f9f379632760a4178e56ffc..b473096d7bc6c41c3948b66c52a8aeb5174233b7 100644 (file)
@@ -3999,6 +3999,8 @@ int RGWRados::rewrite_obj(RGWBucketInfo& dest_bucket_info, const rgw_obj& obj, c
   attrset.erase(RGW_ATTR_ID_TAG);
   attrset.erase(RGW_ATTR_TAIL_TAG);
   attrset.erase(RGW_ATTR_STORAGE_CLASS);
+  attrset.erase(RGW_ATTR_SHARE_MANIFEST);
+  attrset.erase(RGW_ATTR_BLAKE3);
 
   ACLOwner owner;
   if (auto i = attrset.find(RGW_ATTR_ACL); i != attrset.end()) {
@@ -4890,6 +4892,8 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& dest_obj_ctx,
   if (!keep_tags) {
     attrs.erase(RGW_ATTR_TAGS);
   }
+  attrs.erase(RGW_ATTR_SHARE_MANIFEST);
+  attrs.erase(RGW_ATTR_BLAKE3);
 
   if (copy_if_newer) {
     uint64_t pg_ver = 0;
@@ -5300,6 +5304,8 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
 
   if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */
     attrs.erase(RGW_ATTR_TAIL_TAG);
+    attrs.erase(RGW_ATTR_SHARE_MANIFEST);
+    attrs.erase(RGW_ATTR_BLAKE3);
     // Data is rewritten as a single stream; drop stale multipart boundaries
     attrs.erase(RGW_ATTR_CRYPT_PARTS);
     attrs.erase(RGW_ATTR_CRYPT_PART_NUMS);
@@ -5340,6 +5346,8 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
   if (!copy_itself) {
     aio = rgw::make_throttle(cct->_conf->rgw_max_copy_obj_concurrent_io, y);
     attrs.erase(RGW_ATTR_TAIL_TAG);
+    attrs.erase(RGW_ATTR_SHARE_MANIFEST);
+    attrs.erase(RGW_ATTR_BLAKE3);
     manifest = *amanifest;
     const rgw_bucket_placement& tail_placement = manifest.get_tail_placement();
     if (tail_placement.bucket.name.empty()) {
@@ -5695,6 +5703,8 @@ int RGWRados::transition_obj(RGWObjectCtx& obj_ctx,
   }
   attrs.erase(RGW_ATTR_ID_TAG);
   attrs.erase(RGW_ATTR_TAIL_TAG);
+  attrs.erase(RGW_ATTR_SHARE_MANIFEST);
+  attrs.erase(RGW_ATTR_BLAKE3);
 
   ACLOwner owner;
   if (auto i = attrs.find(RGW_ATTR_ACL); i != attrs.end()) {