diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mon/MonmapMonitor.cc | 2 | ||||
-rw-r--r-- | src/mon/Paxos.cc | 16 | ||||
-rw-r--r-- | src/mon/Paxos.h | 5 | ||||
-rw-r--r-- | src/mon/PaxosService.h | 7 |
4 files changed, 4 insertions, 26 deletions
diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc index badac7e0922..d7472797f15 100644 --- a/src/mon/MonmapMonitor.cc +++ b/src/mon/MonmapMonitor.cc @@ -111,7 +111,7 @@ void MonmapMonitor::update_from_paxos() } if (need_restart) { - paxos->prepare_bootstrap(); + mon->bootstrap(); } } diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 1c2333c0949..bfb9ed4f5dd 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -37,13 +37,6 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon, const string& name, << ") "; } -void Paxos::prepare_bootstrap() -{ - dout(0) << __func__ << dendl; - - going_to_bootstrap = true; -} - MonitorDBStore *Paxos::get_store() { return mon->store; @@ -836,12 +829,6 @@ void Paxos::finish_proposal() first_committed = get_store()->get(get_name(), "first_committed"); last_committed = get_store()->get(get_name(), "last_committed"); - if (proposals.empty() && going_to_bootstrap) { - dout(0) << __func__ << " no more proposals; bootstraping." << dendl; - mon->bootstrap(); - return; - } - if (should_trim()) { trim(); } @@ -1097,8 +1084,6 @@ void Paxos::leader_init() if (!proposals.empty()) finish_contexts(g_ceph_context, proposals, -EAGAIN); - going_to_bootstrap = false; - if (mon->get_quorum().size() == 1) { state = STATE_ACTIVE; return; @@ -1132,7 +1117,6 @@ void Paxos::restart() new_value.clear(); state = STATE_RECOVERING; - going_to_bootstrap = false; if (!proposals.empty()) finish_contexts(g_ceph_context, proposals, -EAGAIN); diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index 2e1bb62dda9..160b02ecef2 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -530,7 +530,6 @@ private: * @} */ - bool going_to_bootstrap; /** * Should be true if we have proposed to trim, or are in the middle of * trimming; false otherwise. @@ -1017,7 +1016,6 @@ public: lease_timeout_event(0), accept_timeout_event(0), clock_drift_warned(0), - going_to_bootstrap(false), going_to_trim(false), trim_disabled_version(0) { } @@ -1025,9 +1023,6 @@ public: return paxos_name; } - bool is_bootstrapping() { return going_to_bootstrap; } - void prepare_bootstrap(); - void dispatch(PaxosServiceMessage *m); void reapply_all_versions(); diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index 0e4c9e23b02..4de73ea4b19 100644 --- a/src/mon/PaxosService.h +++ b/src/mon/PaxosService.h @@ -498,8 +498,7 @@ public: */ bool is_active() { return (!is_proposing() && !paxos->is_recovering() - && !paxos->is_locked() - && !paxos->is_bootstrapping()); + && !paxos->is_locked()); } /** @@ -579,7 +578,7 @@ public: * @param c The callback to be awaken once we become active. */ void wait_for_active(Context *c) { - if (paxos->is_bootstrapping() || !is_proposing()) { + if (!is_proposing()) { paxos->wait_for_active(c); return; } @@ -612,7 +611,7 @@ public: * @param c The callback to be awaken once we become writeable. */ void wait_for_writeable(Context *c) { - if (paxos->is_bootstrapping() || !is_proposing()) { + if (!is_proposing()) { paxos->wait_for_writeable(c); return; } |