Skip to content

Does a RaftError always indicate that a node is broken and must shutdown? #320

Answered by drmingdrmer
semirix asked this question in Q&A
Discussion options

You must be logged in to vote

I assume you are using v0.6.4, in this version RaftError::SnapshotMismatch is only used internally thus an application should have no chance of receiving such an error.

I'd recommend using the latest main branch in which the errors are better defined:
client_write() will return an ClientWriteError:

pub enum ClientWriteError<NID: NodeId> {
    #[error(transparent)]
    ForwardToLeader(#[from] ForwardToLeader<NID>),

    /// When writing a change-membership entry.
    #[error(transparent)]
    ChangeMembershipError(#[from] ChangeMembershipError<NID>),

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

ClientWriteError is much more obvious for an application to deal with.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@semirix
Comment options

@drmingdrmer
Comment options

Answer selected by semirix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants