Skip to content

Commit

Permalink
osd/OSD: fix HeartbeatInfo.is_healthy() check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xiexingguo committed Jul 31, 2018
1 parent aba6037 commit d912315
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/osd/OSD.h
Expand Up @@ -1526,6 +1526,11 @@ class OSD : public Dispatcher,
}

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);
}
};
Expand Down

0 comments on commit d912315

Please sign in to comment.