From c5470e0f855b246cfbde6982ca90f565e7074600 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 1 Jun 2011 17:04:21 -0700 Subject: [PATCH] OSD: don't keep old connection over new one in update_heartbeat_peers Signed-off-by: Samuel Just --- src/osd/OSD.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 32f505f1441e..d90669d41b32 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1456,7 +1456,10 @@ void OSD::update_heartbeat_peers() if (heartbeat_from.count(p)) continue; heartbeat_from[p] = osdmap->get_epoch(); - heartbeat_con[p] = heartbeat_messenger->get_connection(osdmap->get_hb_inst(p)); + if (!heartbeat_con.count(p)) { + // Don't update _con, might be from a newer map + heartbeat_con[p] = heartbeat_messenger->get_connection(osdmap->get_hb_inst(p)); + } if (old_from_stamp.count(p) && old_from.count(p) && old_con[p] == heartbeat_con[p]) { // have a stamp _AND_ i'm not new to the set -- 2.47.3