]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: improve debugs around sending notify_reply_t.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 4 Mar 2021 18:10:43 +0000 (18:10 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 4 Mar 2021 18:23:56 +0000 (18:23 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/watch.cc
src/crimson/osd/watch.h

index a7a3311aa9b6c3a5321e247c524fc55aa131f96c..1cb85e98019ef5aa8267b00d0325be6b0717cdfe 100644 (file)
@@ -114,6 +114,14 @@ bool notify_reply_t::operator<(const notify_reply_t& rhs) const
   return lhsp < rhsp;
 }
 
+std::ostream &operator<<(std::ostream &out, const notify_reply_t &rhs)
+{
+  out << "notify_reply_t{watcher_gid=" << rhs.watcher_gid
+      << ", watcher_cookie=" << rhs.watcher_cookie
+      << ", bl=" << rhs.bl << "}";
+  return out;
+}
+
 seastar::future<> Notify::remove_watcher(WatchRef watch)
 {
   if (discarded || complete) {
@@ -143,6 +151,7 @@ seastar::future<> Notify::maybe_send_completion()
 {
   logger().info("{} -- {} in progress watchers", __func__, watchers.size());
   if (watchers.empty()) {
+    logger().debug("{} sending notify replies: {}", __func__, notify_replies);
     // prepare reply
     ceph::bufferlist bl;
     encode(notify_replies, bl);
index 6049e16cf4b5a2ab73fc4abd0d345f0f200e7d21..7a18e59c41022d4884d526248f16b697f4f78bc4 100644 (file)
@@ -107,6 +107,7 @@ struct notify_reply_t {
     DENC_FINISH(p);
   }
 };
+std::ostream &operator<<(std::ostream &out, const notify_reply_t &rhs);
 
 class Notify {
   std::set<WatchRef> watchers;