From c0081f315b08d4b1b8772ec7125e4fe26901e08f Mon Sep 17 00:00:00 2001 From: cancaicai <2356672992@qq.com> Date: Sat, 29 Jun 2024 12:19:59 +0800 Subject: [PATCH] feat: remove redundant address check --- .../src/main/java/com/alipay/sofa/jraft/NodeManager.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jraft-core/src/main/java/com/alipay/sofa/jraft/NodeManager.java b/jraft-core/src/main/java/com/alipay/sofa/jraft/NodeManager.java index 236ebf7cd..fb72f1004 100644 --- a/jraft-core/src/main/java/com/alipay/sofa/jraft/NodeManager.java +++ b/jraft-core/src/main/java/com/alipay/sofa/jraft/NodeManager.java @@ -78,10 +78,6 @@ public void addAddress(final Endpoint addr) { * Adds a node. */ public boolean add(final Node node) { - // check address ok? - if (!serverExists(node.getNodeId().getPeerId().getEndpoint())) { - return false; - } final NodeId nodeId = node.getNodeId(); if (this.nodeMap.putIfAbsent(nodeId, node) == null) { final String groupId = node.getGroupId();