]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/services/svc_notify.h
import ceph 15.2.14
[ceph.git] / ceph / src / rgw / services / svc_notify.h
index 031c53120c06d336203c0767f6962c66ca88a529..1e0b35f2c20e4dd3f3840eb200163bb743377525 100644 (file)
@@ -15,6 +15,7 @@ class RGWSI_Finisher;
 
 class RGWWatcher;
 class RGWSI_Notify_ShutdownCB;
+struct RGWCacheNotifyInfo;
 
 class RGWSI_Notify : public RGWServiceInstance
 {
@@ -41,7 +42,7 @@ private:
   bool enabled{false};
 
   double inject_notify_timeout_probability{0};
-  unsigned max_notify_retries{0};
+  static constexpr unsigned max_notify_retries = 10;
 
   string get_control_oid(int i);
   RGWSI_RADOS::Obj pick_control_obj(const string& key);
@@ -77,8 +78,8 @@ private:
   void _set_enabled(bool status);
   void set_enabled(bool status);
 
-  int robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
-                    optional_yield y);
+  int robust_notify(RGWSI_RADOS::Obj& notify_obj,
+                   const RGWCacheNotifyInfo& bl, optional_yield y);
 
   void schedule_context(Context *c);
 public:
@@ -95,7 +96,8 @@ public:
       virtual void set_enabled(bool status) = 0;
   };
 
-  int distribute(const string& key, bufferlist& bl, optional_yield y);
+  int distribute(const string& key, const RGWCacheNotifyInfo& bl,
+                optional_yield y);
 
   void register_watch_cb(CB *cb);
 };