]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: improve debugs around Watch / Notify. 40654/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 7 Apr 2021 19:49:17 +0000 (19:49 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 8 Apr 2021 09:49:51 +0000 (09:49 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/ops_executer.cc
src/crimson/osd/watch.cc
src/crimson/osd/watch.h

index fd9731312d312d03641ba7a888aaf1981026b599..2dd1d4060bce5eb39335c0cdfc34cf841a79ffbe 100644 (file)
@@ -155,6 +155,7 @@ OpsExecuter::watch_ierrorator::future<> OpsExecuter::do_op_watch_subop_watch(
   ObjectState& os,
   ceph::os::Transaction& txn)
 {
+  logger().debug("{}", __func__);
   struct connect_ctx_t {
     ObjectContext::watch_key_t key;
     crimson::net::ConnectionRef conn;
index ee9308e2858c25cfd24e6a38f075843d77019946..cb26d60984aa0187e649dee7f8ff6e4e4f53e762 100644 (file)
@@ -18,6 +18,11 @@ namespace {
 
 namespace crimson::osd {
 
+Watch::~Watch()
+{
+  logger().debug("{} gid={} cookie={}", __func__, get_watcher_gid(), get_cookie());
+}
+
 seastar::future<> Watch::connect(crimson::net::ConnectionRef conn, bool)
 {
   if (this->conn == conn) {
@@ -215,6 +220,10 @@ void Notify::do_timeout()
   // to avoid use-after-free we bump up the ref counter with `guard_ptr`.
   [[maybe_unused]] auto guard_ptr = shared_from_this();
   for (auto& watcher : watchers) {
+    logger().debug("canceling watcher cookie={} gid={} use_count={}",
+      watcher->get_cookie(),
+      watcher->get_watcher_gid(),
+      watcher->use_count());
     watcher->cancel_notify(ninfo.notify_id);
   }
   std::ignore = send_completion(std::move(watchers));
index 4b50d286050f2b5711d90af3361c3cf183ccf656..5ad1f05d898d6122abadeec288ac22830458d40b 100644 (file)
@@ -55,6 +55,7 @@ public:
       winfo(winfo),
       entity_name(entity_name) {
   }
+  ~Watch();
 
   seastar::future<> connect(crimson::net::ConnectionRef, bool);
   bool is_alive() const {