From d0f5ed13567f54b1bdedc388568d2afc5922ab70 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 2 Dec 2021 17:46:26 -0500 Subject: [PATCH] mon/MgrStatMonitor: do not spam subscribers (mgr) with service_map We are comparing the monmap epoch to the service_map epoch! Fixes: https://tracker.ceph.com/issues/53479 Signed-off-by: Sage Weil --- src/mon/MgrStatMonitor.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mon/MgrStatMonitor.cc b/src/mon/MgrStatMonitor.cc index 4996c9b38bf80..9da4c50da084c 100644 --- a/src/mon/MgrStatMonitor.cc +++ b/src/mon/MgrStatMonitor.cc @@ -332,10 +332,9 @@ bool MgrStatMonitor::preprocess_statfs(MonOpRequestRef op) void MgrStatMonitor::check_sub(Subscription *sub) { - const auto epoch = mon.monmap->get_epoch(); dout(10) << __func__ << " next " << sub->next - << " have " << epoch << dendl; + << " vs service_map.epoch " << service_map.epoch << dendl; if (sub->next <= service_map.epoch) { auto m = new MServiceMap(service_map); sub->session->con->send_message(m); @@ -344,7 +343,7 @@ void MgrStatMonitor::check_sub(Subscription *sub) session_map.remove_sub(sub); }); } else { - sub->next = epoch + 1; + sub->next = service_map.epoch + 1; } } } -- 2.39.5