]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove keep_tail from RGWObjState 62711/head
authorJane Zhu <jzhu116@bloomberg.net>
Wed, 2 Apr 2025 15:53:47 +0000 (15:53 +0000)
committerCasey Bodley <cbodley@redhat.com>
Mon, 7 Apr 2025 16:29:39 +0000 (12:29 -0400)
Signed-off-by: Jane Zhu <jzhu116@bloomberg.net>
(cherry picked from commit fd76b6466c298121994ba65cce3c0e76f8568841)

Conflicts:
src/rgw/rgw_sal_store.h RGWObjState is in rgw_sal.h on squid

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.cc
src/rgw/rgw_sal.h

index 3f8191f5a9211a135c3587a7481c92bf98ebddc4..d0cada338d7c24fa0d1deda858d755c0bf039464 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 a7e98f13e52b6492c20c95ae067bb48b6646ac2c..98730a8c6484364fae2a00cbf1a49a04b1e572ae 100644 (file)
@@ -680,7 +680,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);
 
@@ -747,6 +747,7 @@ int AppendObjectProcessor::complete(size_t accounted_size, const string &etag, c
   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 655428f83e9bd959b8373a2cafb3bf77bd27ec61..1b5e145f0346019d4412c83b1505546dc504309b 100644 (file)
@@ -257,6 +257,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;
 
@@ -274,7 +275,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 841dec37656a4f9b3ad05fba3c2530951951c842..d3ee47fc0e08372698d88ac17f43626fb84fa77f 100644 (file)
@@ -4950,8 +4950,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) {
@@ -5368,7 +5366,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 d9dd1bde60339c921c7365dbd5c2dd37dfba9b17..260cb94a2a6443124b58894b45cc2a70a5e5bee8 100644 (file)
@@ -93,7 +93,6 @@ RGWObjState::RGWObjState(const RGWObjState& rhs) : obj (rhs.obj) {
     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;
index 76759b2d53d948d0c7849156da26d30c105b883a..07cf739456b86dffc835762d9ff8b27b4ded9ae8 100644 (file)
@@ -101,7 +101,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};