]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrStatMonitor: do not spam subscribers (mgr) with service_map 44196/head
authorSage Weil <sage@newdream.net>
Thu, 2 Dec 2021 22:46:26 +0000 (17:46 -0500)
committerSage Weil <sage@newdream.net>
Thu, 2 Dec 2021 22:46:26 +0000 (17:46 -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>
src/mon/MgrStatMonitor.cc

index 4996c9b38bf8054361bb013fd7c10c0ffc652d3d..9da4c50da084cb15edaaec042ddba7ae09d9aa6c 100644 (file)
@@ -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;
     }
   }
 }