From: Radoslaw Zarzynski Date: Thu, 4 Mar 2021 18:10:43 +0000 (+0000) Subject: crimson/osd: improve debugs around sending notify_reply_t. X-Git-Tag: v17.1.0~2734^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09910c9352761ed6f8a19fa3f57c184b46d30a59;p=ceph.git crimson/osd: improve debugs around sending notify_reply_t. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/osd/watch.cc b/src/crimson/osd/watch.cc index a7a3311aa9b6..1cb85e98019e 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 6049e16cf4b5..7a18e59c4102 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;