From: Sage Weil Date: Wed, 26 Jul 2017 03:30:33 +0000 (-0400) Subject: mon/MgrMonitor: reset mgrdigest timer with new subscription X-Git-Tag: v12.1.2~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc23834f25594a94ca0da13830ea2ccb9b187c47;p=ceph.git mon/MgrMonitor: reset mgrdigest timer with new subscription 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 --- diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index 5f1f06bdede6..fb760260f3ec 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -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(); }