]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: mdsmon: tick() from on_active() instead of committed()
authorSage Weil <sage@newdream.net>
Fri, 18 Nov 2011 18:01:30 +0000 (10:01 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 19 Nov 2011 22:30:31 +0000 (14:30 -0800)
Same effect, and avoids useless committed().

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h
src/mon/PaxosService.cc

index 28fa3950eaef57db6f747cb5d2a543435cee3e11..160ed50bd06d20192acb60e29073226fc5f10fec 100644 (file)
@@ -474,6 +474,10 @@ void MDSMonitor::_updated(MMDSBeacon *m)
 
 
 void MDSMonitor::committed()
+{
+}
+
+void MDSMonitor::on_active()
 {
   tick();
 }
index 6ee80790c5292229885f1ae114ace3a8bd7b59e3..f970329c8f0e257acc3897640b3736c0a016437e 100644 (file)
@@ -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);
index 783af679736127abf62fa99c99033093d3618527..3d6ceef869cf45632834a387ef8cf2cca1901461 100644 (file)
@@ -195,7 +195,8 @@ void PaxosService::_active()
     }
   }
 
-  on_active();
+  if (paxos->is_active())
+    on_active();
 }