Skip to content

Commit

Permalink
Change: remove error AddLearnerError::Exists
Browse files Browse the repository at this point in the history
Even when the learner to add already exists, the caller may still want
to block until the replication catches up. Thus it does not expect an
error.

And `Exists` is not an issue the caller has to deal with, it does not
have to be an error.
  • Loading branch information
drmingdrmer committed Jul 1, 2022
1 parent ac7ea58 commit 6b9ae52
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions openraft/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ pub enum AddLearnerError<NID: NodeId> {
#[error(transparent)]
ForwardToLeader(#[from] ForwardToLeader<NID>),

#[error("node {0} is already a learner")]
Exists(NID),

#[error(transparent)]
MissingNodeInfo(#[from] MissingNodeInfo<NID>),

Expand Down

0 comments on commit 6b9ae52

Please sign in to comment.