]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: fix HeartbeatInfo.is_healthy() check 23307/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 8 Jan 2018 07:02:58 +0000 (15:02 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 31 Jul 2018 12:58:53 +0000 (20:58 +0800)
Delay to declared to be healthy until we have received the first
replies from both front and back connections.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.h

index 7c79bcc317af31faf3d035dcd7fa57af57f220cb..f1fe9db9ea728e6c14807cc031120fe021f47324 100644 (file)
@@ -1526,6 +1526,11 @@ private:
     }
 
     bool is_healthy(utime_t now) {
+      if (last_rx_front == utime_t() || last_rx_back == utime_t()) {
+        // only declare to be healthy until we have received the first
+        // replies from both front/back connections
+        return false;
+      }
       return !is_unhealthy(now);
     }
   };