]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove keep_tail from RGWObjState 62604/head
authorJane Zhu <jzhu116@bloomberg.net>
Wed, 2 Apr 2025 15:53:47 +0000 (15:53 +0000)
committerJane Zhu <jzhu116@bloomberg.net>
Wed, 2 Apr 2025 15:53:47 +0000 (15:53 +0000)
Signed-off-by: Jane Zhu <jzhu116@bloomberg.net>
src/rgw/driver/dbstore/common/dbstore.h
src/rgw/driver/rados/rgw_putobj_processor.cc
src/rgw/driver/rados/rgw_putobj_processor.h
src/rgw/driver/rados/rgw_rados.cc
src/rgw/rgw_sal_store.h

index 0f49d5e0dd2e5c8434b2f1a2ea4b0177807082a4..e488d56ff74fe5bca552d2862fad10ed55a79d5f 100644 (file)
@@ -517,7 +517,7 @@ class DBOp {
        *
        * - RGWObjState. Below are omitted from that struct
        *    as they seem in-memory variables
-       *    * is_atomic, has_atts, exists, prefetch_data, keep_tail, 
+       *    * is_atomic, has_atts, exists, prefetch_data, 
        * - RGWObjManifest
        *
        * Extra field added "IsMultipart" to flag multipart uploads,
index 8ce92a0dffb838895cabbf5297516bb04f738e27..cd07a416d591e43d9dc648cc0f540a3ed9c27b19 100644 (file)
@@ -717,7 +717,7 @@ int AppendObjectProcessor::prepare(optional_yield y)
       tail_placement_rule.storage_class = RGW_STORAGE_CLASS_STANDARD;
     }
     manifest.set_prefix(cur_manifest->get_prefix());
-    astate->keep_tail = true;
+    keep_tail = true;
   }
   manifest.set_multipart_part_rule(store->ctx()->_conf->rgw_obj_stripe_size, cur_part_num);
 
@@ -789,6 +789,7 @@ int AppendObjectProcessor::complete(
   obj_op.meta.user_data = user_data;
   obj_op.meta.zones_trace = zones_trace;
   obj_op.meta.modify_tail = true;
+  obj_op.meta.keep_tail = keep_tail;
   obj_op.meta.appendable = true;
   //Add the append part number
   bufferlist cur_part_num_bl;
index 3f3b0b31fcff3430855853314f11b49a4066b30e..26ecad42ba1aaf0ac57c8021840460f13cdab92a 100644 (file)
@@ -259,6 +259,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
     uint64_t *cur_accounted_size;
     std::string cur_etag;
     const std::string unique_tag;
+    bool keep_tail;
 
     RGWObjManifest *cur_manifest;
 
@@ -276,7 +277,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
             : ManifestObjectProcessor(aio, store, bucket_info, ptail_placement_rule,
                                       owner, obj_ctx, _head_obj, dpp, y, trace),
               position(position), cur_size(0), cur_accounted_size(cur_accounted_size),
-              unique_tag(unique_tag), cur_manifest(nullptr)
+              unique_tag(unique_tag), keep_tail(false), cur_manifest(nullptr)
     {}
     int prepare(optional_yield y) override;
     int complete(size_t accounted_size, const std::string& etag,
index 99dd0577592002c289d7c4baed5ba794c33f144e..46b33f03a3cf4241b7e9a71324b81a614914ae29 100644 (file)
@@ -5011,8 +5011,6 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
     pmanifest = &manifest;
   } else {
     pmanifest = amanifest;
-    /* don't send the object's tail for garbage collection */
-    astate->keep_tail = true;
   }
 
   if (copy_first) {
@@ -5662,7 +5660,7 @@ int RGWRados::bucket_suspended(const DoutPrefixProvider *dpp, rgw_bucket& bucket
 
 int RGWRados::Object::complete_atomic_modification(const DoutPrefixProvider *dpp, bool keep_tail, optional_yield y)
 {
-  if ((!manifest) || state->keep_tail || keep_tail)
+  if ((!manifest) || keep_tail)
     return 0;
 
   cls_rgw_obj_chain chain;
index a44f3bc189d7658e7b84793d306b03ea459f8fdd..524a879eede47782f313a0c244a682c0cd9e311b 100644 (file)
@@ -37,7 +37,6 @@ struct RGWObjState {
   bool has_data{false};
   bufferlist data;
   bool prefetch_data{false};
-  bool keep_tail{false};
   bool is_olh{false};
   bufferlist olh_tag;
   uint64_t pg_ver{false};
@@ -73,7 +72,6 @@ struct RGWObjState {
       data = rhs.data;
     }
     prefetch_data = rhs.prefetch_data;
-    keep_tail = rhs.keep_tail;
     is_olh = rhs.is_olh;
     objv_tracker = rhs.objv_tracker;
     pg_ver = rhs.pg_ver;