]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/services/svc_notify.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rgw / services / svc_notify.cc
index c634934e4844042d5db52c889901750129743281..093e7d76534b3f71c613651c5418acddd949a4b2 100644 (file)
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string notify_oid_prefix = "notify";
 
+RGWSI_Notify::~RGWSI_Notify()
+{
+  shutdown();
+}
+
+
 class RGWWatcher : public DoutPrefixProvider , public librados::WatchCtx2 {
   CephContext *cct;
   RGWSI_Notify *svc;
@@ -70,7 +78,7 @@ public:
     obj.notify_ack(notify_id, cookie, reply_bl);
   }
   void handle_error(uint64_t cookie, int err) override {
-    lderr(cct) << "RGWWatcher::handle_error cookie " << cookie
+    ldpp_dout(this, -1) << "RGWWatcher::handle_error cookie " << cookie
                        << " err " << cpp_strerror(err) << dendl;
     svc->remove_watcher(index);
     svc->schedule_context(new C_ReinitWatch(this));
@@ -268,7 +276,7 @@ int RGWSI_Notify::do_start(optional_yield y, const DoutPrefixProvider *dpp)
 
   int ret = init_watch(dpp, y);
   if (ret < 0) {
-    lderr(cct) << "ERROR: failed to initialize watch: " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, -1) << "ERROR: failed to initialize watch: " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
@@ -296,11 +304,6 @@ void RGWSI_Notify::shutdown()
   finalized = true;
 }
 
-RGWSI_Notify::~RGWSI_Notify()
-{
-  shutdown();
-}
-
 int RGWSI_Notify::unwatch(RGWSI_RADOS::Obj& obj, uint64_t watch_handle)
 {
   int r = obj.unwatch(watch_handle);
@@ -407,7 +410,7 @@ int RGWSI_Notify::robust_notify(const DoutPrefixProvider *dpp,
   // If we timed out, get serious.
   if (r == -ETIMEDOUT) {
     RGWCacheNotifyInfo info;
-    info.op = REMOVE_OBJ;
+    info.op = INVALIDATE_OBJ;
     info.obj = cni.obj;
     bufferlist retrybl;
     encode(info, retrybl);