pub(super) fn remove_non_voter(&mut self, id: NodeId, tx: ChangeMembershipTx) {
        let want_to_remove_node_catching_up = match self.consensus_state {
            ConsensusState::CatchingUp { node, .. } => node == id,
            _ => false,
        };
        if want_to_remove_node_catching_up {
            let _ = tx.send(Err(ChangeConfigError::ConfigChangeInProgress));
            return;
        }

        if let Some(state) = self.non_voters.remove(&id) {
            let _ = state.state.replstream.repltx.send(RaftEvent::Terminate);
            let _ = tx.send(Ok(()));
            return;
        }

        tracing::debug!("target node is is not recognized as a Non-Voter");
        let _ = tx.send(Err(ChangeConfigError::Noop));
    }
/// Remove the Non-Voter with the specified identifier, responding on
/// the given channel.
///
/// If the node is being synced as part of a configuration change, then
/// this request will fail.
Remove the Non-Voter with the specified identifier, responding on
the given channel.

If the node is being synced as part of a configuration change, then
this request will fail.
Remove the Non - Voter with the specified identifier responding on the given channel . If the node is being synced as part of a configuration change then this request will fail .
pub(super) fn remove_non_voter(&mut self, id: NodeId, tx: ChangeMembershipTx) {
        let want_to_remove_node_catching_up = match self.consensus_state {
            ConsensusState::CatchingUp { node, .. } => node == id,
            _ => false,
        };
        if want_to_remove_node_catching_up {
            let _ = tx.send(Err(ChangeConfigError::ConfigChangeInProgress));
            return;
        }
        if let Some(state) = self.non_voters.remove(&id) {
            let _ = state.state.replstream.repltx.send(RaftEvent::Terminate);
            let _ = tx.send(Ok(()));
            return;
        }
        tracing::debug!("target node is is not recognized as a Non-Voter");
        let _ = tx.send(Err(ChangeConfigError::Noop));
    }
pub ( super ) fn remove_non_voter ( & mut self , id : NodeId , tx : ChangeMembershipTx ) { let want_to_remove_node_catching_up = match self . consensus_state { ConsensusState :: CatchingUp { node , .. } => node == id , _ => false , } ; if want_to_remove_node_catching_up { let _ = tx . send ( Err ( ChangeConfigError :: ConfigChangeInProgress ) ) ; return ; } if let Some ( state ) = self . non_voters . remove ( & id ) { let _ = state . state . replstream . repltx . send ( RaftEvent :: Terminate ) ; let _ = tx . send ( Ok ( ( ) ) ) ; return ; } tracing :: debug ! ( " " ) ; let _ = tx . send ( Err ( ChangeConfigError :: Noop ) ) ; }
Remove the Non-Voter with the specified identifier, responding on
the given channel.
Remove the Non - Voter with the specified identifier responding on the given channel .
&mut self
id
NodeId
tx
ChangeMembershipTx
&mut self
id
NodeId
tx
ChangeMembershipTx