From: Joao Eduardo Luis Date: Fri, 31 Aug 2012 17:39:27 +0000 (+0100) Subject: mon: Paxos: get rid of slurp-related code X-Git-Tag: v0.59~150^2~1^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b33d4eacaadd84eb765df55772dc9d11cbc6e36e;p=ceph.git mon: Paxos: get rid of slurp-related code Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index e964c128bccf..add582ea263c 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -61,8 +61,6 @@ void Paxos::init() << accepted_pn << " last_committed: " << last_committed << " first_committed: " << first_committed << dendl; - //slurping = get_store()->get(get_name(), "slurping"); - dout(10) << "init" << dendl; } @@ -1216,34 +1214,6 @@ bool Paxos::propose_new_value(bufferlist& bl, Context *onfinished) bool Paxos::is_consistent() { - bool consistent = true; - if (first_committed > last_committed) - consistent = false; - if (slurping != 0) - consistent = false; - - if (!(consistent || (slurping == 1))) { - dout(5) << "consistent: " << consistent - << " slurping: " << slurping << dendl; - } - assert(consistent || (slurping == 1)); - return consistent; -} - -void Paxos::start_slurping() -{ - if (slurping != 1) { - slurping = 1; -// get_store()->put(get_name(), "slurping", 1); - } -} - -void Paxos::end_slurping() -{ - if (slurping == 1) { - slurping = 0; - // get_store()->put(get_name(), "slurping", slurping); - } - assert(is_consistent()); + return (first_committed <= last_committed); } diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index a2be3907836e..ca1304365f0f 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -312,10 +312,6 @@ private: * last committed version, which will then be kept in this map. */ map peer_last_committed; - /** - * @todo Check out what 'slurping' is. - */ - int slurping; /** * @} */ @@ -1007,7 +1003,6 @@ public: last_committed(0), accepted_pn(0), accepted_pn_from(0), - slurping(0), num_last(0), uncommitted_v(0), uncommitted_pn(0), collect_timeout_event(0), @@ -1193,18 +1188,6 @@ public: return true; } - /** - * @defgroup Paxos_h_slurping_funcs Slurping-related functions - * @todo Discover what slurping is - * @{ - */ - void start_slurping(); - void end_slurping(); - bool is_slurping() { return slurping == 1; } - /** - * @} - */ - // read /** * @defgroup Paxos_h_read_funcs Read-related functions