]> 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>
Mon, 31 Jul 2023 18:31:47 +0000 (14:31 -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>
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 9c3c482f2f56c3d9ac5a05fe3467475702052944..477fd0529078d57ee10d73e99380ff31f33c5f59 100644 (file)
@@ -3258,7 +3258,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 6804b2819b7ec84ffd12d73c592944be38f4c22f..f2215702119780872c46878e1c289b9d996a9eb5 100644 (file)
@@ -1351,13 +1351,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 d6300a0023dd7c4307488922673dee1fa2186034..446df40e4b1399020332fa81f7e15348a1861a02 100644 (file)
@@ -390,11 +390,6 @@ class RGWRados
 
   librados::IoCtx root_pool_ctx;      // .rgw
 
-  double inject_notify_timeout_probability{0.0};
-  unsigned max_notify_retries{0};
-
-  friend class RGWWatcher;
-
   ceph::mutex bucket_id_lock{ceph::make_mutex("rados_bucket_id")};
 
   // This field represents the number of bucket index object 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);