]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: reset mgrdigest timer with new subscription 16582/head
authorSage Weil <sage@redhat.com>
Wed, 26 Jul 2017 03:30:33 +0000 (23:30 -0400)
committerSage Weil <sage@redhat.com>
Wed, 26 Jul 2017 03:30:33 +0000 (23:30 -0400)
If the manager reconnects, we want to send the digest immediately and
reset the previous timer.

Fixes: http://tracker.ceph.com/issues/20633
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MgrMonitor.cc

index 5f1f06bdede67335117332cb1bcc42d9f2d7f93a..fb760260f3ec695cb5e799c62cb8ad13c75c2714 100644 (file)
@@ -408,6 +408,10 @@ void MgrMonitor::check_sub(Subscription *sub)
     }
   } else {
     assert(sub->type == "mgrdigest");
+    if (sub->next == 0) {
+      // new registration; cancel previous timer
+      cancel_timer();
+    }
     if (digest_event == nullptr) {
       send_digests();
     }