]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Paxos: get rid of slurp-related code
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 31 Aug 2012 17:39:27 +0000 (18:39 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 21 Feb 2013 18:02:22 +0000 (18:02 +0000)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/Paxos.cc
src/mon/Paxos.h

index e964c128bccfb2e9ada12f12af9ad365f1079448..add582ea263c5edf97141e1b232c910b73cc62bf 100644 (file)
@@ -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);
 }
 
index a2be3907836ee01642f3aa4b8df4e8f510b89fcc..ca1304365f0ff6dc73f71d87b008672f9ba0c9b7 100644 (file)
@@ -312,10 +312,6 @@ private:
    * last committed version, which will then be kept in this map.
    */
   map<int,version_t> 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