]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: copy_obj_data() can use yielding throttle
authorCasey Bodley <cbodley@redhat.com>
Sat, 11 Mar 2023 19:28:44 +0000 (14:28 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 2 Oct 2024 20:04:05 +0000 (16:04 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b929958f0f57170bec6351d9f4826e658c522f13)

src/rgw/driver/rados/rgw_rados.cc

index 9a4361ffe609ae4789bc71931c70fda12edcab8c..9260a1edc06861aa8f9b3ffcae5287320b1a1e66 100644 (file)
@@ -4675,14 +4675,11 @@ int RGWRados::copy_obj_data(RGWObjectCtx& obj_ctx,
   string tag;
   append_rand_alpha(cct, tag, tag, 32);
 
-  rgw::BlockingAioThrottle aio(cct->_conf->rgw_put_obj_min_window_size);
+  auto aio = rgw::make_throttle(cct->_conf->rgw_put_obj_min_window_size, y);
   using namespace rgw::putobj;
-  // do not change the null_yield in the initialization of this AtomicObjectProcessor
-  // it causes crashes in the ragweed tests
-  AtomicObjectProcessor processor(&aio, this, dest_bucket_info, &dest_placement,
-                                  dest_bucket_info.owner, obj_ctx,
-                                  dest_obj, olh_epoch, tag,
-                                 dpp, null_yield);
+  AtomicObjectProcessor processor(aio.get(), this, dest_bucket_info,
+                                  &dest_placement, dest_bucket_info.owner,
+                                  obj_ctx, dest_obj, olh_epoch, tag, dpp, y);
   int ret = processor.prepare(y);
   if (ret < 0)
     return ret;