mon: mdsmon: tick() from on_active() instead of committed()

Same effect, and avoids useless committed().

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-11-18 10:01:30 -08:00 committed by Sage Weil
parent becfce356c
commit b521710f10
3 changed files with 7 additions and 1 deletions

View File

@ -474,6 +474,10 @@ void MDSMonitor::_updated(MMDSBeacon *m)
void MDSMonitor::committed()
{
}
void MDSMonitor::on_active()
{
tick();
}

View 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);

View File

@ -195,7 +195,8 @@ void PaxosService::_active()
}
}
on_active();
if (paxos->is_active())
on_active();
}