]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW | fixed enqueueing the overwritten object for gc 65949/head
authorAli Masarwa <amasarwa@redhat.com>
Tue, 12 Aug 2025 12:15:23 +0000 (15:15 +0300)
committerYuma Ogami <yuma-ogami@cybozu.co.jp>
Wed, 22 Oct 2025 04:13:24 +0000 (04:13 +0000)
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
(cherry picked from commit 69353cfe247f3757853c1964f1b607b2a4952d94)

src/rgw/driver/rados/rgw_rados.cc

index 6d8123fc16ba234d8e508689564f963e25c2c9d2..13296ab60fdf13f08f480bd0ec3afcc326df1377 100644 (file)
@@ -3258,9 +3258,8 @@ int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_si
     ptag = index_op->get_optag();
   }
 
-  r = target->get_state(rctx.dpp, &target->state, &target->manifest, false, rctx.y);
-  if (r < 0)
-    return r;
+  target->manifest = manifest;
+  target->state = state;
   RGWObjState* current_state = target->state;
   if (!target->obj.key.instance.empty()) {
     r = target->get_current_version_state(rctx.dpp, current_state, rctx.y);
@@ -6033,6 +6032,9 @@ 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)
 {
+  int r = get_state(dpp, &state, &manifest, false, y);
+  if (r < 0)
+    return r;
   if ((!manifest) || keep_tail)
     return 0;