From: Sage Weil Date: Fri, 18 Nov 2011 18:01:30 +0000 (-0800) Subject: mon: mdsmon: tick() from on_active() instead of committed() X-Git-Tag: v0.39~22^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b521710f1002fe7a2dbd015ba4427ea2b09aad4c;p=ceph.git mon: mdsmon: tick() from on_active() instead of committed() Same effect, and avoids useless committed(). Signed-off-by: Sage Weil --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 28fa3950eaef..160ed50bd06d 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -474,6 +474,10 @@ void MDSMonitor::_updated(MMDSBeacon *m) void MDSMonitor::committed() +{ +} + +void MDSMonitor::on_active() { tick(); } diff --git a/src/mon/MDSMonitor.h b/src/mon/MDSMonitor.h index 6ee80790c529..f970329c8f0e 100644 --- a/src/mon/MDSMonitor.h +++ b/src/mon/MDSMonitor.h @@ -78,6 +78,7 @@ class MDSMonitor : public PaxosService { bool should_propose(double& delay); void committed(); + void on_active(); void _note_beacon(class MMDSBeacon *m); bool preprocess_beacon(class MMDSBeacon *m); diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 783af6797361..3d6ceef869cf 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -195,7 +195,8 @@ void PaxosService::_active() } } - on_active(); + if (paxos->is_active()) + on_active(); }