]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrStatMonitor: do not spam subscribers (mgr) with service_map 44722/head
authorSage Weil <sage@newdream.net>
Thu, 2 Dec 2021 22:46:26 +0000 (17:46 -0500)
committerCory Snyder <csnyder@iland.com>
Fri, 21 Jan 2022 17:24:00 +0000 (12:24 -0500)
We are comparing the monmap epoch to the service_map epoch!

Fixes: https://tracker.ceph.com/issues/53479
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d0f5ed13567f54b1bdedc388568d2afc5922ab70)

Conflicts:
src/mon/MgrStatMonitor.cc

Cherry-pick notes:
- MgrStatMonitor mon member was a pointer in Octopus

src/mon/MgrStatMonitor.cc

index b27bf5d680a0dd3414019603dbe00f4ca06a46c2..4d3ecead280ae4d360dbff4b354c9d2a717b6572 100644 (file)
@@ -305,10 +305,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);
@@ -317,7 +316,7 @@ void MgrStatMonitor::check_sub(Subscription *sub)
          session_map.remove_sub(sub);
        });
     } else {
-      sub->next = epoch + 1;
+      sub->next = service_map.epoch + 1;
     }
   }
 }