]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: reenable cache notify config variables
authorCasey Bodley <cbodley@redhat.com>
Mon, 31 Jul 2023 18:29:25 +0000 (14:29 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 3 Aug 2023 20:36:47 +0000 (16:36 -0400)
these config options are meant to control this cache notification
behavior, but were never moved from RGWRados into RGWSI_Notify

raise the default rgw_max_notify_retries to 10 to match the adjusted
value from https://github.com/ceph/ceph/pull/42251

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2d7dd06ccb580471ab63578b0ba8e2d466ab7ec0)

src/common/options/rgw.yaml.in
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/services/svc_notify.cc
src/rgw/services/svc_notify.h

index 48b58ca65a66acf7d300f9858aa1df11511000b5..241632a229be24fb8c7e0f38cacb800281642915 100644 (file)
@@ -3241,7 +3241,7 @@ options:
     is very heavily loaded. Beware that increasing this value may cause some operations
     to take longer in exceptional cases and thus may, rarely, cause clients to time
     out.
-  default: 3
+  default: 10
   tags:
   - error recovery
   services:
index df334e99e3998a350be490f0007cac501c95b500..fb2c8aaadbb696b8787b7c8ed730030d6750ebef 100644 (file)
@@ -1342,13 +1342,7 @@ int RGWRados::init_ctl(const DoutPrefixProvider *dpp)
  */
 int RGWRados::init_begin(const DoutPrefixProvider *dpp)
 {
-  int ret;
-
-  inject_notify_timeout_probability =
-    cct->_conf.get_val<double>("rgw_inject_notify_timeout_probability");
-  max_notify_retries = cct->_conf.get_val<uint64_t>("rgw_max_notify_retries");
-
-  ret = init_svc(false, dpp);
+  int ret = init_svc(false, dpp);
   if (ret < 0) {
     ldpp_dout(dpp, 0) << "ERROR: failed to init services (ret=" << cpp_strerror(-ret) << ")" << dendl;
     return ret;
index 3c6b8bc25ddf2bc19718cb686d56ea8edd52f76e..045ef1ee8d17a86fddd9ba30b7e07a67efcf888b 100644 (file)
@@ -382,12 +382,7 @@ class RGWRados
 
   librados::IoCtx root_pool_ctx;      // .rgw
 
-  double inject_notify_timeout_probability = 0;
-  unsigned max_notify_retries = 0;
-
-  friend class RGWWatcher;
-
-  ceph::mutex bucket_id_lock = ceph::make_mutex("rados_bucket_id");
+  ceph::mutex bucket_id_lock{ceph::make_mutex("rados_bucket_id")};
 
   // This field represents the number of bucket index object shards
   uint32_t bucket_index_max_shards;
index b08c17af2dad1ed9a9c799ad0040297b712274fe..18ba9045217e6353b3773d876c1024122e0f25db 100644 (file)
@@ -278,6 +278,10 @@ int RGWSI_Notify::do_start(optional_yield y, const DoutPrefixProvider *dpp)
     return r;
   }
 
+  inject_notify_timeout_probability =
+    cct->_conf.get_val<double>("rgw_inject_notify_timeout_probability");
+  max_notify_retries = cct->_conf.get_val<uint64_t>("rgw_max_notify_retries");
+
   control_pool = zone_svc->get_zone_params().control_pool;
 
   int ret = init_watch(dpp, y);
index 38d2ab50964c54593f18c5775d8a78dfb28d1877..f7329136ece1718d6951700bd3b1cd65711e0066 100644 (file)
@@ -42,7 +42,7 @@ private:
   bool enabled{false};
 
   double inject_notify_timeout_probability{0};
-  static constexpr unsigned max_notify_retries = 10;
+  uint64_t max_notify_retries = 10;
 
   std::string get_control_oid(int i);
   RGWSI_RADOS::Obj pick_control_obj(const std::string& key);