From 5659a4eb1db3462cd9b2be271ffa801f35129b1a Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Mon, 21 Jan 2013 18:45:03 +0000 Subject: [PATCH] mon: Remove global version code introduced around bobtail's release This patch reverts most of the global version (gv) related patches that were introduced around bobtail's release as a prelude to the single-paxos patches. The gv infrastructure allowed us to gather version information on the monitors, essential to the move to a single-paxos implementation on existing clusters -- this means that for an existing cluster to upgrade to the a single-paxos monitor, it will first have to be upgraded to a version prior to this patch. This patch strips the monitor subsystem of all the gv-related code that is of no use for upcoming versions. Furthermore, from this patch onwards until all single-paxos patches are merged, ceph-mon won't work as expected, and may not compile at some point in the git history. These patches are not retro-compatible, and the monitors are not expected to work with earlier versions. Signed-off-by: Joao Eduardo Luis --- src/messages/MMonPaxos.h | 10 +--- src/messages/MMonProbe.h | 9 +--- src/mon/AuthMonitor.cc | 4 +- src/mon/LogMonitor.cc | 4 +- src/mon/MDSMonitor.cc | 7 ++- src/mon/Monitor.cc | 112 +-------------------------------------- src/mon/Monitor.h | 16 ------ src/mon/MonitorStore.cc | 26 +-------- src/mon/MonitorStore.h | 4 +- src/mon/OSDMonitor.cc | 4 +- src/mon/PGMonitor.cc | 4 +- src/mon/Paxos.cc | 76 +++++++------------------- src/mon/Paxos.h | 2 +- 13 files changed, 38 insertions(+), 240 deletions(-) diff --git a/src/messages/MMonPaxos.h b/src/messages/MMonPaxos.h index cee58eb123035..af1c9c6be8513 100644 --- a/src/messages/MMonPaxos.h +++ b/src/messages/MMonPaxos.h @@ -22,8 +22,8 @@ class MMonPaxos : public Message { - static const int HEAD_VERSION = 2; - static const int COMPAT_VERSION = 1; + static const int HEAD_VERSION = 3; + static const int COMPAT_VERSION = 3; public: // op types @@ -64,8 +64,6 @@ class MMonPaxos : public Message { map values; - map gv; // global version map; stepping stone for bobtail -> cuttlefish transition. - MMonPaxos() : Message(MSG_MON_PAXOS, HEAD_VERSION, COMPAT_VERSION) { } MMonPaxos(epoch_t e, int o, int mid, utime_t now) : Message(MSG_MON_PAXOS, HEAD_VERSION, COMPAT_VERSION), @@ -88,7 +86,6 @@ public: << " lc " << last_committed << " fc " << first_committed << " pn " << pn << " opn " << uncommitted_pn; - out << " gv " << gv; if (latest_version) out << " latest " << latest_version << " (" << latest_value.length() << " bytes)"; out << ")"; @@ -111,7 +108,6 @@ public: ::encode(latest_version, payload); ::encode(latest_value, payload); ::encode(values, payload); - ::encode(gv, payload); } void decode_payload() { bufferlist::iterator p = payload.begin(); @@ -129,8 +125,6 @@ public: ::decode(latest_version, p); ::decode(latest_value, p); ::decode(values, p); - if (header.version >= 2) - ::decode(gv, p); } }; diff --git a/src/messages/MMonProbe.h b/src/messages/MMonProbe.h index 3cec753566f6d..b15b6738c305c 100644 --- a/src/messages/MMonProbe.h +++ b/src/messages/MMonProbe.h @@ -22,8 +22,8 @@ class MMonProbe : public Message { public: - static const int HEAD_VERSION = 3; - static const int COMPAT_VERSION = 1; + static const int HEAD_VERSION = 4; + static const int COMPAT_VERSION = 4; enum { OP_PROBE = 1, @@ -57,8 +57,6 @@ public: bufferlist latest_value; version_t latest_version, newest_version, oldest_version; - map > gv; - MMonProbe() : Message(MSG_MON_PROBE, HEAD_VERSION, COMPAT_VERSION) {} MMonProbe(const uuid_d& f, int o, const string& n, bool hej) @@ -105,7 +103,6 @@ public: ::encode(latest_value, payload); ::encode(latest_version, payload); ::encode(has_ever_joined, payload); - ::encode(gv, payload); } void decode_payload() { bufferlist::iterator p = payload.begin(); @@ -125,8 +122,6 @@ public: ::decode(has_ever_joined, p); else has_ever_joined = false; - if (header.version >= 3) - ::decode(gv, p); } }; diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index e4cd752f29b2c..49e69b0fcde3f 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -67,8 +67,8 @@ void AuthMonitor::check_rotate() void AuthMonitor::tick() { - if (!paxos->is_active() || - !mon->is_all_paxos_recovered()) return; + if (!paxos->is_active()) + return; update_from_paxos(); dout(10) << *this << dendl; diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index f06de5217a0c4..4bdc2cb970400 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -68,8 +68,8 @@ ostream& operator<<(ostream& out, LogMonitor& pm) void LogMonitor::tick() { - if (!paxos->is_active() || - !mon->is_all_paxos_recovered()) return; + if (!paxos->is_active()) + return; update_from_paxos(); dout(10) << *this << dendl; diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index cd2dc8fa51795..18209e6508fb3 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -995,8 +995,8 @@ void MDSMonitor::tick() { // make sure mds's are still alive // ...if i am an active leader - if (!paxos->is_active() || - !mon->is_all_paxos_recovered()) return; + if (!paxos->is_active()) + return; update_from_paxos(); dout(10) << mdsmap << dendl; @@ -1255,8 +1255,7 @@ void MDSMonitor::do_stop() { // hrm... if (!mon->is_leader() || - !paxos->is_active() || - !mon->is_all_paxos_recovered()) { + !paxos->is_active()) { dout(0) << "do_stop can't stop right now, mdsmap not writeable" << dendl; return; } diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 699db8968f175..b28b205375f0d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -203,109 +203,6 @@ Monitor::~Monitor() delete mon_caps; } -void Monitor::recovered_leader(int id) -{ - dout(10) << "recovered_leader " << id << " " << get_paxos_name(id) << " (" << paxos_recovered << ")" << dendl; - assert(paxos_recovered.count(id) == 0); - paxos_recovered.insert(id); - if (paxos_recovered.size() == paxos.size()) { - dout(10) << "all paxos instances recovered, going writeable" << dendl; - - if (!features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_GV) && - (quorum_features & CEPH_FEATURE_MON_GV)) { - require_gv_ondisk(); - require_gv_onwire(); - } - - for (list::iterator p = paxos.begin(); p != paxos.end(); p++) { - if (!(*p)->is_active()) - continue; - finish_contexts(g_ceph_context, (*p)->waiting_for_active); - } - for (list::iterator p = paxos.begin(); p != paxos.end(); p++) { - if (!(*p)->is_active()) - continue; - finish_contexts(g_ceph_context, (*p)->waiting_for_commit); - } - for (list::iterator p = paxos.begin(); p != paxos.end(); p++) { - if (!(*p)->is_readable()) - continue; - finish_contexts(g_ceph_context, (*p)->waiting_for_readable); - } - for (list::iterator p = paxos.begin(); p != paxos.end(); p++) { - if (!(*p)->is_writeable()) - continue; - finish_contexts(g_ceph_context, (*p)->waiting_for_writeable); - } - } -} - -void Monitor::recovered_peon(int id) -{ - // unlike recovered_leader(), recovered_peon() can get called - // multiple times, because it is triggered by a paxos lease message, - // and the leader may send multiples of those out for a given paxos - // machine while it is waiting for another instance to recover. - if (paxos_recovered.count(id)) - return; - dout(10) << "recovered_peon " << id << " " << get_paxos_name(id) << " (" << paxos_recovered << ")" << dendl; - paxos_recovered.insert(id); - if (paxos_recovered.size() == paxos.size()) { - dout(10) << "all paxos instances recovered/leased" << dendl; - - if (!features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_GV) && - (quorum_features & CEPH_FEATURE_MON_GV)) { - require_gv_ondisk(); - require_gv_onwire(); - } - } -} - -void Monitor::require_gv_ondisk() -{ - dout(0) << "setting CEPH_MON_FEATURE_INCOMPAT_GV" << dendl; - features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_GV); - write_features(); -} - -void Monitor::require_gv_onwire() -{ - dout(10) << "require_gv_onwire" << dendl; - // require protocol feature bit of my peers - Messenger::Policy p = messenger->get_policy(entity_name_t::TYPE_MON); - p.features_required |= CEPH_FEATURE_MON_GV; - messenger->set_policy(entity_name_t::TYPE_MON, p); -} - -version_t Monitor::get_global_paxos_version() -{ - // this should only be called when paxos becomes writeable, which is - // *after* everything settles after an election. - assert(is_all_paxos_recovered()); - - if ((quorum_features & CEPH_FEATURE_MON_GV) == 0) { - // do not sure issuing gv's until the entire quorum supports them. - // this way we synchronize the setting of the incompat GV ondisk - // feature with actually writing the values to the data store, and - // avoid having to worry about hybrid cases. - dout(10) << "get_global_paxos_version no-op; quorum does not support the feature" << dendl; - return 0; - } - - if (global_version == 0) { - global_version = - osdmon()->paxos->get_version() + - mdsmon()->paxos->get_version() + - monmon()->paxos->get_version() + - pgmon()->paxos->get_version() + - authmon()->paxos->get_version() + - logmon()->paxos->get_version(); - dout(10) << "get_global_paxos_version first call this election epoch, starting from " << global_version << dendl; - } - ++global_version; - dout(20) << "get_global_paxos_version " << global_version << dendl; - return global_version; -} enum { l_mon_first = 456000, @@ -407,9 +304,6 @@ void Monitor::read_features() bufferlist::iterator p = bl.begin(); ::decode(features, p); dout(10) << "features " << features << dendl; - - if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_GV)) - require_gv_onwire(); } void Monitor::write_features() @@ -745,9 +639,6 @@ void Monitor::reset() quorum.clear(); outside_quorum.clear(); - paxos_recovered.clear(); - global_version = 0; - for (list::iterator p = paxos.begin(); p != paxos.end(); p++) (*p)->restart(); for (vector::iterator p = paxos_service.begin(); p != paxos_service.end(); p++) @@ -1048,7 +939,6 @@ MMonProbe *Monitor::fill_probe_data(MMonProbe *m, Paxos *pax) for (; v <= pax->get_version(); v++) { store->get_bl_sn_safe(r->paxos_values[m->machine_name][v], m->machine_name.c_str(), v); len += r->paxos_values[m->machine_name][v].length(); - r->gv[m->machine_name][v] = store->get_global_version(m->machine_name.c_str(), v); for (list::iterator p = pax->extra_state_dirs.begin(); p != pax->extra_state_dirs.end(); ++p) { @@ -1108,7 +998,7 @@ void Monitor::handle_probe_data(MMonProbe *m) for (map >::iterator p = m->paxos_values.begin(); p != m->paxos_values.end(); ++p) { - store->put_bl_sn_map(p->first.c_str(), p->second.begin(), p->second.end(), &m->gv[p->first]); + store->put_bl_sn_map(p->first.c_str(), p->second.begin(), p->second.end()); } pax->last_committed = m->paxos_values.begin()->second.rbegin()->first; diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index c7704bb16da3c..a2395239db52d 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -191,22 +191,6 @@ private: list waitfor_quorum; list maybe_wait_for_quorum; - // multi-paxos global version sequencing kludge-o-rama - set paxos_recovered; ///< num paxos machines fully recovered during this election epoch - version_t global_version; - - void require_gv_ondisk(); - void require_gv_onwire(); - -public: - void recovered_leader(int id); - void recovered_peon(int id); - version_t get_global_paxos_version(); - bool is_all_paxos_recovered() { - return paxos_recovered.size() == paxos.size(); - } - -private: /** * @defgroup Monitor_h_TimeCheck Monitor Clock Drift Early Warning System * @{ diff --git a/src/mon/MonitorStore.cc b/src/mon/MonitorStore.cc index a74b750787c0b..fc44e257674d0 100644 --- a/src/mon/MonitorStore.cc +++ b/src/mon/MonitorStore.cc @@ -229,14 +229,6 @@ version_t MonitorStore::get_global_version(const char *a, version_t b) return get_int(fn, fn2); } -void MonitorStore::put_global_version(const char *a, version_t b, version_t gv) -{ - char fn[1024], fn2[1024]; - snprintf(fn, sizeof(fn), "%s_gv", a); - snprintf(fn2, sizeof(fn2), "%llu", (long long unsigned)b); - put_int(gv, fn, fn2); -} - // ---------------------------------------- // buffers @@ -276,13 +268,6 @@ void MonitorStore::erase_ss(const char *a, const char *b) int r = ::unlink(fn); assert(0 == r || ENOENT == errno); // callers don't check for existence first - if (b) { - // wipe out _gv file too, if any. this is sloppy, but will work. - char gvf[1024]; - snprintf(gvf, sizeof(gvf), "%s/%s_gv/%s", dir.c_str(), a, b); - ::unlink(gvf); // ignore error; it may not be there. - } - ::rmdir(dr); // sloppy attempt to clean up empty dirs } @@ -397,8 +382,7 @@ void MonitorStore::write_bl_ss(bufferlist& bl, const char *a, const char *b, boo void MonitorStore::put_bl_sn_map(const char *a, map::iterator start, - map::iterator end, - map *gvmap) + map::iterator end) { int err = 0; int close_err = 0; @@ -414,8 +398,6 @@ void MonitorStore::put_bl_sn_map(const char *a, // just do them individually for (map::iterator p = start; p != end; ++p) { put_bl_sn(p->second, a, p->first); - if (gvmap && gvmap->count(p->first) && (*gvmap)[p->first] > 0) - put_global_version(a, p->first, (*gvmap)[p->first]); } return; } @@ -449,12 +431,6 @@ void MonitorStore::put_bl_sn_map(const char *a, assert (0 == close_err); if (err < 0) assert(0 == "failed to write"); - - // this doesn't try to be efficient.. too bad for you! it may also - // extend beyond commmitted, but that's okay; we only look at these - // if the actual state files exist too. - if (gvmap && gvmap->count(p->first) && (*gvmap)[p->first]) - put_global_version(a, p->first, (*gvmap)[p->first]); } // sync them all diff --git a/src/mon/MonitorStore.h b/src/mon/MonitorStore.h index 9d1efde3d53ef..76b8363369e72 100644 --- a/src/mon/MonitorStore.h +++ b/src/mon/MonitorStore.h @@ -44,7 +44,6 @@ public: void put_int(version_t v, const char *a, const char *b=0); version_t get_global_version(const char *a, version_t b) WARN_UNUSED_RESULT; - void put_global_version(const char *a, version_t b, version_t gv); // buffers // ss and sn varieties. @@ -88,8 +87,7 @@ public: */ void put_bl_sn_map(const char *a, map::iterator start, - map::iterator end, - map *gvmap); + map::iterator end); void erase_ss(const char *a, const char *b); void erase_sn(const char *a, version_t b) { diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 1355938c582cf..ded713aff51c0 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1435,8 +1435,8 @@ void OSDMonitor::check_sub(Subscription *sub) void OSDMonitor::tick() { - if (!paxos->is_active() || - !mon->is_all_paxos_recovered()) return; + if (!paxos->is_active()) + return; update_from_paxos(); dout(10) << osdmap << dendl; diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 7e9b83ba5e0d7..95954b7253bfd 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -116,8 +116,8 @@ void PGMonitor::update_logger() void PGMonitor::tick() { - if (!paxos->is_active() || - !mon->is_all_paxos_recovered()) return; + if (!paxos->is_active()) + return; update_from_paxos(); handle_osd_timeouts(); diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index fbe141e3a84b8..20f3089b49716 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -152,7 +152,6 @@ void Paxos::handle_collect(MMonPaxos *collect) dout(10) << " sharing our accepted but uncommitted value for " << last_committed+1 << " (" << bl.length() << " bytes)" << dendl; last->values[last_committed+1] = bl; - last->gv[last_committed+1] = mon->store->get_global_version(machine_name, last_committed+1); last->uncommitted_pn = accepted_pn; } @@ -187,7 +186,6 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed, if (mon->store->exists_bl_sn(machine_name, v)) { mon->store->get_bl_sn_safe(m->values[v], machine_name, v); assert(m->values[v].length()); - m->gv[v] = mon->store->get_global_version(machine_name, v); dout(10) << " sharing " << v << " (" << m->values[v].length() << " bytes)" << dendl; } @@ -247,7 +245,7 @@ void Paxos::store_state(MMonPaxos *m) dout(10) << "store_state [" << start->first << ".." << last_committed << "]" << dendl; - mon->store->put_bl_sn_map(machine_name, start, end, &m->gv); + mon->store->put_bl_sn_map(machine_name, start, end); mon->store->put_int(last_committed, machine_name, "last_committed"); mon->store->put_int(first_committed, machine_name, "first_committed"); } @@ -289,13 +287,11 @@ void Paxos::handle_last(MMonPaxos *last) << num_last << " peons" << dendl; // did this person send back an accepted but uncommitted value? - version_t uncommitted_gv = 0; if (last->uncommitted_pn && last->uncommitted_pn > uncommitted_pn) { uncommitted_v = last->last_committed+1; uncommitted_pn = last->uncommitted_pn; uncommitted_value = last->values[uncommitted_v]; - uncommitted_gv = last->gv[uncommitted_v]; dout(10) << "we learned an uncommitted value for " << uncommitted_v << " pn " << uncommitted_pn << " " << uncommitted_value.length() << " bytes" @@ -332,20 +328,15 @@ void Paxos::handle_last(MMonPaxos *last) if (uncommitted_v == last_committed+1 && uncommitted_value.length()) { dout(10) << "that's everyone. begin on old learned value" << dendl; - begin(uncommitted_value, uncommitted_gv); + begin(uncommitted_value); } else { // active! dout(10) << "that's everyone. active!" << dendl; extend_lease(); - // wake people up - if (mon->is_all_paxos_recovered()) { - finish_contexts(g_ceph_context, waiting_for_active); - finish_contexts(g_ceph_context, waiting_for_readable); - finish_contexts(g_ceph_context, waiting_for_writeable); - } else { - mon->recovered_leader(machine_id); - } + finish_contexts(g_ceph_context, waiting_for_active); + finish_contexts(g_ceph_context, waiting_for_readable); + finish_contexts(g_ceph_context, waiting_for_writeable); } } } else { @@ -366,11 +357,10 @@ void Paxos::collect_timeout() // leader -void Paxos::begin(bufferlist& v, version_t gv) +void Paxos::begin(bufferlist& v) { dout(10) << "begin for " << last_committed+1 << " " << v.length() << " bytes" - << " gv " << gv << dendl; assert(mon->is_leader()); @@ -389,22 +379,16 @@ void Paxos::begin(bufferlist& v, version_t gv) accepted.insert(mon->rank); new_value = v; mon->store->put_bl_sn(new_value, machine_name, last_committed+1); - if (gv > 0) - mon->store->put_global_version(machine_name, last_committed+1, gv); if (mon->get_quorum().size() == 1) { // we're alone, take it easy commit(); state = STATE_ACTIVE; - if (mon->is_all_paxos_recovered()) { - finish_contexts(g_ceph_context, waiting_for_active); - finish_contexts(g_ceph_context, waiting_for_commit); - finish_contexts(g_ceph_context, waiting_for_readable); - finish_contexts(g_ceph_context, waiting_for_writeable); - } else { - mon->recovered_leader(machine_id); - } + finish_contexts(g_ceph_context, waiting_for_active); + finish_contexts(g_ceph_context, waiting_for_commit); + finish_contexts(g_ceph_context, waiting_for_readable); + finish_contexts(g_ceph_context, waiting_for_writeable); return; } @@ -419,7 +403,6 @@ void Paxos::begin(bufferlist& v, version_t gv) MMonPaxos *begin = new MMonPaxos(mon->get_epoch(), MMonPaxos::OP_BEGIN, machine_id, ceph_clock_now(g_ceph_context)); begin->values[last_committed+1] = new_value; - begin->gv[last_committed+1] = gv; begin->last_committed = last_committed; begin->pn = accepted_pn; @@ -451,11 +434,9 @@ void Paxos::handle_begin(MMonPaxos *begin) // yes. version_t v = last_committed+1; - dout(10) << "accepting value for " << v << " pn " << accepted_pn << " gv " << begin->gv[v] << dendl; + dout(10) << "accepting value for " << v << " pn " << accepted_pn << dendl; mon->store->put_bl_sn(begin->values[v], machine_name, v); - if (begin->gv.count(v) && begin->gv[v] > 0) - mon->store->put_global_version(machine_name, v, begin->gv[v]); - + // reply MMonPaxos *accept = new MMonPaxos(mon->get_epoch(), MMonPaxos::OP_ACCEPT, machine_id, ceph_clock_now(g_ceph_context)); @@ -512,14 +493,10 @@ void Paxos::handle_accept(MMonPaxos *accept) extend_lease(); // wake people up - if (mon->is_all_paxos_recovered()) { - finish_contexts(g_ceph_context, waiting_for_active); - finish_contexts(g_ceph_context, waiting_for_commit); - finish_contexts(g_ceph_context, waiting_for_readable); - finish_contexts(g_ceph_context, waiting_for_writeable); - } else { - mon->recovered_leader(machine_id); - } + finish_contexts(g_ceph_context, waiting_for_active); + finish_contexts(g_ceph_context, waiting_for_commit); + finish_contexts(g_ceph_context, waiting_for_readable); + finish_contexts(g_ceph_context, waiting_for_writeable); } accept->put(); } @@ -561,7 +538,6 @@ void Paxos::commit() MMonPaxos *commit = new MMonPaxos(mon->get_epoch(), MMonPaxos::OP_COMMIT, machine_id, ceph_clock_now(g_ceph_context)); commit->values[last_committed] = new_value; - commit->gv[last_committed] = mon->store->get_global_version(machine_name, last_committed); commit->pn = accepted_pn; commit->last_committed = last_committed; @@ -588,9 +564,7 @@ void Paxos::handle_commit(MMonPaxos *commit) commit->put(); - if (mon->is_all_paxos_recovered()) - finish_contexts(g_ceph_context, waiting_for_commit); - // otherwise, this'll go when they all recover. + finish_contexts(g_ceph_context, waiting_for_commit); } void Paxos::extend_lease() @@ -682,9 +656,6 @@ void Paxos::handle_lease(MMonPaxos *lease) state = STATE_ACTIVE; - if (!mon->is_all_paxos_recovered()) - mon->recovered_peon(machine_id); - dout(10) << "handle_lease on " << lease->last_committed << " now " << lease_expire << dendl; @@ -859,7 +830,6 @@ void Paxos::leader_init() if (mon->get_quorum().size() == 1) { state = STATE_ACTIVE; - mon->recovered_leader(machine_id); return; } @@ -989,12 +959,6 @@ version_t Paxos::read_current(bufferlist &bl) bool Paxos::is_writeable() { - // do not allow new paxos writes until all paxos machines have - // recovered. this ensures that the global versions we choose at - // proposal time are sanely ordered. - if (!mon->is_all_paxos_recovered()) - return false; - if (mon->get_quorum().size() == 1) return true; return mon->is_leader() && @@ -1022,13 +986,11 @@ bool Paxos::propose_new_value(bufferlist& bl, Context *oncommit) // cancel lease renewal and timeout events. cancel_events(); - version_t global_version = mon->get_global_paxos_version(); - // ok! - dout(5) << "propose_new_value " << last_committed+1 << " " << bl.length() << " bytes, gv " << global_version << dendl; + dout(5) << "propose_new_value " << last_committed+1 << " " << bl.length() << " bytes" << dendl; if (oncommit) waiting_for_commit.push_back(oncommit); - begin(bl, global_version); + begin(bl); return true; } diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index adc8af399adf5..d148855d02747 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -634,7 +634,7 @@ private: * * @param value The value being proposed to the quorum */ - void begin(bufferlist& value, version_t global_version); + void begin(bufferlist& value); /** * Accept or decline (by ignoring) a proposal from the Leader. * -- 2.39.5