From 1bd22edc0a8dc7a9c314341370b3dfeb357411b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Fri, 30 Sep 2022 21:26:40 +0800 Subject: [PATCH] Change: remove AddLearnerError::Exists, which is not actually used --- openraft/src/error.rs | 3 --- openraft/src/raft.rs | 4 ---- 2 files changed, 7 deletions(-) diff --git a/openraft/src/error.rs b/openraft/src/error.rs index 2a9dfd31c..cf4180015 100644 --- a/openraft/src/error.rs +++ b/openraft/src/error.rs @@ -115,9 +115,6 @@ pub enum AddLearnerError { #[error(transparent)] ForwardToLeader(#[from] ForwardToLeader), - #[error("node {0} is already a learner")] - Exists(NodeId), - #[error(transparent)] Fatal(#[from] Fatal), } diff --git a/openraft/src/raft.rs b/openraft/src/raft.rs index c55506fb6..298b7213d 100644 --- a/openraft/src/raft.rs +++ b/openraft/src/raft.rs @@ -317,10 +317,6 @@ impl, S: RaftStorage> Ra AddLearnerError::ForwardToLeader(forward_err) => { return Err(ClientWriteError::ForwardToLeader(forward_err)) } - AddLearnerError::Exists(node_id) => { - tracing::info!(%node_id, "add learner: already exists"); - continue; - } AddLearnerError::Fatal(f) => return Err(ClientWriteError::Fatal(f)), } }