]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: add optional_yield to RGWSI_Notify
authorCasey Bodley <cbodley@redhat.com>
Sat, 24 Nov 2018 15:19:15 +0000 (10:19 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 29 Mar 2019 15:12:49 +0000 (11:12 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_notify.cc
src/rgw/services/svc_notify.h

index e557fa0fb0b960fd4f505e895d171ebe9ee34aa8..f48b497b7fb91f4d4198aee48c1fedd59b18f065 100644 (file)
@@ -353,23 +353,25 @@ void RGWSI_Notify::_set_enabled(bool status)
   }
 }
 
-int RGWSI_Notify::distribute(const string& key, bufferlist& bl)
+int RGWSI_Notify::distribute(const string& key, bufferlist& bl,
+                             optional_yield y)
 {
   RGWSI_RADOS::Obj notify_obj = pick_control_obj(key);
 
   ldout(cct, 10) << "distributing notification oid=" << notify_obj.get_ref().obj
       << " bl.length()=" << bl.length() << dendl;
-  return robust_notify(notify_obj, bl);
+  return robust_notify(notify_obj, bl, y);
 }
 
-int RGWSI_Notify::robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl)
+int RGWSI_Notify::robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
+                                optional_yield y)
 {
   // The reply of every machine that acks goes in here.
   boost::container::flat_set<std::pair<uint64_t, uint64_t>> acks;
   bufferlist rbl;
 
   // First, try to send, without being fancy about it.
-  auto r = notify_obj.notify(bl, 0, &rbl);
+  auto r = notify_obj.notify(bl, 0, &rbl, y);
 
   // If that doesn't work, get serious.
   if (r < 0) {
@@ -409,7 +411,7 @@ int RGWSI_Notify::robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl)
       rbl.clear();
       // Reset the timeouts, we're only concerned with new ones.
       timeouts.clear();
-      r = notify_obj.notify(bl, 0, &rbl);
+      r = notify_obj.notify(bl, 0, &rbl, y);
       if (r < 0) {
        ldout(cct, 1) << "robust_notify: retry " << tries << " failed: "
                      << cpp_strerror(-r) << dendl;
index cd9d9eb89d973f3cc579ad7883a1eff71f332974..306a5f337a4f2b69a1cf27bebb2ad81f452f4db7 100644 (file)
@@ -74,7 +74,8 @@ private:
   void _set_enabled(bool status);
   void set_enabled(bool status);
 
-  int robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl);
+  int robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
+                    optional_yield y);
 
   void schedule_context(Context *c);
 public:
@@ -91,7 +92,7 @@ public:
       virtual void set_enabled(bool status) = 0;
   };
 
-  int distribute(const string& key, bufferlist& bl);
+  int distribute(const string& key, bufferlist& bl, optional_yield y);
 
   void register_watch_cb(CB *cb);
 };