]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: copy_obj_data() can use yielding throttle 50347/head
authorCasey Bodley <cbodley@redhat.com>
Sat, 11 Mar 2023 19:28:44 +0000 (14:28 -0500)
committerCasey Bodley <cbodley@redhat.com>
Sun, 12 Mar 2023 23:52:41 +0000 (19:52 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_rados.cc

index 96a4efe1744368158b46851d82bf2e1dab9bb96f..5c0497ddad10552e76a03bc1c10e1361fd612410 100644 (file)
@@ -4619,14 +4619,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;