]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: skip heartbeat_check for osd which we haven't sent ping to 8369/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 30 Mar 2016 09:24:08 +0000 (17:24 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 30 Mar 2016 10:01:38 +0000 (18:01 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 823f4170d8adc6e75b589550b544403e3b131461..d14fccb1837bef3b7439f1b03ff8f8a480abaeca 100644 (file)
@@ -4027,6 +4027,13 @@ void OSD::heartbeat_check()
   for (map<int,HeartbeatInfo>::iterator p = heartbeat_peers.begin();
        p != heartbeat_peers.end();
        ++p) {
+
+    if (p->second.first_tx == utime_t()) {
+      dout(25) << "heartbeat_check we haven't sent ping to osd." << p->first
+               << "yet, skipping" << dendl;
+      continue;
+    }
+
     dout(25) << "heartbeat_check osd." << p->first
             << " first_tx " << p->second.first_tx
             << " last_tx " << p->second.last_tx