]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: simplify mds laggy check
authorSage Weil <sage.weil@dreamhost.com>
Tue, 12 Apr 2011 20:54:53 +0000 (13:54 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 12 Apr 2011 21:08:43 +0000 (14:08 -0700)
We should never have a laggy standby, so technically this doesn't change
any behavior, but it makes the flow less confusing.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mon/MDSMonitor.cc

index 1b605988325d97e420626b8cfa080c7a20567847..36cf8a02d3fc6b0793dafcc75239b1ca2e3f3211 100644 (file)
@@ -1021,7 +1021,7 @@ void MDSMonitor::tick()
        pending_mdsmap.mds_info.erase(gid);
        last_beacon.erase(gid);
        do_propose = true;
-      } else if (!info.laggy()) {
+      } else {
        if (info.state == MDSMap::STATE_STANDBY ||
            info.state == MDSMap::STATE_STANDBY_REPLAY) {
          // remove it
@@ -1029,7 +1029,7 @@ void MDSMonitor::tick()
                   << " " << ceph_mds_state_name(info.state)
                   << " (laggy)" << dendl;
          pending_mdsmap.mds_info.erase(gid);
-       } else {
+       } else if (!info.laggy()) {
          dout(10) << " marking " << gid << " " << info.addr << " mds" << info.rank << "." << info.inc
                   << " " << ceph_mds_state_name(info.state)
                   << " laggy" << dendl;