From 09910c9352761ed6f8a19fa3f57c184b46d30a59 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Thu, 4 Mar 2021 18:10:43 +0000 Subject: [PATCH] crimson/osd: improve debugs around sending notify_reply_t. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/watch.cc | 9 +++++++++ src/crimson/osd/watch.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/crimson/osd/watch.cc b/src/crimson/osd/watch.cc index a7a3311aa9b6c..1cb85e98019ef 100644 --- a/src/crimson/osd/watch.cc +++ b/src/crimson/osd/watch.cc @@ -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); diff --git a/src/crimson/osd/watch.h b/src/crimson/osd/watch.h index 6049e16cf4b5a..7a18e59c41022 100644 --- a/src/crimson/osd/watch.h +++ b/src/crimson/osd/watch.h @@ -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 watchers; -- 2.39.5