From 1f584095dee3f14f2d33203d6f0855465f9c2216 Mon Sep 17 00:00:00 2001 From: tier-cap Date: Thu, 21 Apr 2022 20:47:47 +0800 Subject: [PATCH] fix one bug about MsgUnreachable local type close tikv/tikv#11371 Signed-off-by: tier-cap --- src/raw_node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raw_node.rs b/src/raw_node.rs index a15a1489..ec1918b9 100644 --- a/src/raw_node.rs +++ b/src/raw_node.rs @@ -55,11 +55,11 @@ pub enum SnapshotStatus { /// Checks if certain message type should be used internally. pub fn is_local_msg(t: MessageType) -> bool { + // remove MessageType::MsgUnreachable matches!( t, MessageType::MsgHup | MessageType::MsgBeat - | MessageType::MsgUnreachable | MessageType::MsgSnapStatus | MessageType::MsgCheckQuorum ) @@ -805,7 +805,7 @@ mod test { let tests = vec![ (MessageType::MsgHup, true), (MessageType::MsgBeat, true), - (MessageType::MsgUnreachable, true), + (MessageType::MsgUnreachable, false), (MessageType::MsgSnapStatus, true), (MessageType::MsgCheckQuorum, true), (MessageType::MsgPropose, false),