diff options
author | Sage Weil <sage@newdream.net> | 2011-11-18 10:01:30 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-11-19 14:30:31 -0800 |
commit | b521710f1002fe7a2dbd015ba4427ea2b09aad4c (patch) | |
tree | 576581d89979a706c3e37d57c61a1b9eb4b92e4e | |
parent | becfce356ce090750e01ffacb7082a7269acae90 (diff) | |
download | ceph-b521710f1002fe7a2dbd015ba4427ea2b09aad4c.tar.gz |
mon: mdsmon: tick() from on_active() instead of committed()
Same effect, and avoids useless committed().
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | src/mon/MDSMonitor.cc | 4 | ||||
-rw-r--r-- | src/mon/MDSMonitor.h | 1 | ||||
-rw-r--r-- | src/mon/PaxosService.cc | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 28fa3950eae..160ed50bd06 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -475,6 +475,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 6ee80790c52..f970329c8f0 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 783af679736..3d6ceef869c 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(); } |