From: xie xingguo Date: Mon, 8 Jan 2018 07:02:58 +0000 (+0800) Subject: osd/OSD: fix HeartbeatInfo.is_healthy() check X-Git-Tag: v14.0.1~683^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9123158d1fef329fb9bf5ff787f9c84bb51b44c;p=ceph.git osd/OSD: fix HeartbeatInfo.is_healthy() check Delay to declared to be healthy until we have received the first replies from both front and back connections. Signed-off-by: xie xingguo --- diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 7c79bcc317af..f1fe9db9ea72 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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); } };