From: Sage Weil Date: Thu, 26 Aug 2010 19:31:44 +0000 (-0700) Subject: osd: mark down old _from connections too; and fix old _from debug output X-Git-Tag: v0.21.2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3b97ffc1fad10c2efa792dd759891cef80b70a1;p=ceph.git osd: mark down old _from connections too; and fix old _from debug output --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 52d8e7c48842..74c9f8867335 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1247,10 +1247,17 @@ void OSD::update_heartbeat_peers() for (map::iterator p = old_from.begin(); p != old_from.end(); p++) { - if (heartbeat_to.count(p->first) == 0 || - heartbeat_inst[p->first] != old_inst[p->first]) - dout(10) << "update_heartbeat_peers: dropped old _from osd" << p->first - << " " << old_inst[p->first] << dendl; + if (heartbeat_from.count(p->first) == 0 || + heartbeat_inst[p->first] != old_inst[p->first]) { + if (heartbeat_to.count(p->first) == 0) { + dout(10) << "update_heartbeat_peers: marking down old _from peer " << old_inst[p->first] + << " as of " << p->second << dendl; + heartbeat_messenger->mark_down(old_inst[p->first].addr); + } else { + dout(10) << "update_heartbeat_peers: old _from peer " << old_inst[p->first] + << " is still a _to peer, not marking down" << dendl; + } + } } heartbeat_epoch = osdmap->get_epoch();