]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: clear ping_history on heartbeat_reset 24006/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Sep 2018 02:15:23 +0000 (10:15 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Sep 2018 10:50:50 +0000 (18:50 +0800)
Because the old connections are gone, and hence we should not
leave behind a long list of obsolete ping_history there, which
is misleading...

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 2498c5ecb62f32723e4852270a7e2da4293207e6..53494a050b6d07ef990c716aaa845d13c548fefa 100644 (file)
@@ -4995,6 +4995,7 @@ bool OSD::heartbeat_reset(Connection *con)
          p->second.con_front = newcon.second.get();
          p->second.con_front->set_priv(s);
        }
+        p->second.ping_history.clear();
       } else {
        dout(10) << "heartbeat_reset failed hb con " << con << " for osd." << p->second.peer
                 << ", raced with osdmap update, closing out peer" << dendl;