]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: remove is_write_ready()
authorKefu Chai <kchai@redhat.com>
Tue, 28 Nov 2017 01:50:36 +0000 (09:50 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Nov 2017 07:20:20 +0000 (15:20 +0800)
is_writeable() is an alias of is_write_ready(). the former is a public
interface, and is well documented. so let's keep is_writeable().

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/PaxosService.h

index bf989d1385fc02e7307182d65cc9e2b9af4fda52..8b025aa0fec1522d9e9aa3374b79afabd1dc71ec 100644 (file)
@@ -530,16 +530,6 @@ public:
    * @returns true if writeable; false otherwise
    */
   bool is_writeable() const {
-    return is_write_ready(); 
-  }
-
-  /**
-   * Check if we are ready to be written to.  This means we must have a
-   * pending value and be active.
-   *
-   * @returns true if we are ready to be written to; false otherwise.
-   */
-  bool is_write_ready() const {
     return is_active() && have_pending;
   }
 
@@ -625,7 +615,7 @@ public:
 
     if (is_proposing())
       wait_for_finished_proposal(op, c);
-    else if (!is_write_ready())
+    else if (!is_writeable())
       wait_for_active(op, c);
     else
       paxos->wait_for_writeable(op, c);