diff options
author | Sage Weil <sage@redhat.com> | 2017-02-26 20:16:13 +0100 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2017-03-29 17:39:25 +0200 |
commit | cc6e568baa6de5cb3900bc89b3a2a7fcba935c57 (patch) | |
tree | 1f91852ccd9082fc74ba1b7ed8c7a79161995f31 /src/mon/Monitor.cc | |
parent | mon/MgrMonitor: feed our MgrClient MgrMaps (diff) | |
download | ceph-cc6e568baa6de5cb3900bc89b3a2a7fcba935c57.tar.xz ceph-cc6e568baa6de5cb3900bc89b3a2a7fcba935c57.zip |
mon: add a finisher
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/mon/Monitor.cc')
-rw-r--r-- | src/mon/Monitor.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 2da72ba2b62..461dc6ad6c3 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -156,6 +156,7 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorDBStore *s, con_self(m ? m->get_loopback_connection() : NULL), lock("Monitor::lock"), timer(cct_, lock), + finisher(cct_, "mon_finisher", "fin"), cpu_tp(cct, "Monitor::cpu_tp", "cpu_tp", g_conf->mon_cpu_threads), has_ever_joined(false), logger(NULL), cluster_logger(NULL), cluster_logger_registered(false), @@ -836,6 +837,8 @@ int Monitor::init() dout(2) << "init" << dendl; Mutex::Locker l(lock); + finisher.start(); + // start ticker timer.init(); new_tick(); @@ -962,6 +965,11 @@ void Monitor::shutdown() mgr_client.shutdown(); + lock.Unlock(); + finisher.wait_for_empty(); + finisher.stop(); + lock.Lock(); + // clean up paxos->shutdown(); for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); ++p) |