/// Demote leader replica as follower.
/// This only happens on manual election
Demote leader replica as follower.
This only happens on manual election
Demote leader replica as follower . This only happens on manual election
pub async fn demote_replica(&self,replica: Replica) {
        debug!("demoting replica: {}",replica);
        if let Some(leader_replica_state) = self.ctx.leaders_state().remove_replica(&replica.id) {
            drop(leader_replica_state);
            // for now, we re-scan file replica
            self.add_follower_replica(replica).await;
        } else {
            error!("leader controller was not found: {}",replica.id)
        }
    }
pub async fn demote_replica ( & self , replica : Replica ) { debug ! ( " " replica ) ; if let Some ( leader_replica_state ) = self . ctx . leaders_state ( ) . remove_replica ( & replica . id ) { drop ( leader_replica_state ) ; // for now, we re-scan file replica self . add_follower_replica ( replica ) . await ; } else { error ! ( " " replica id ) } }
Demote leader replica as follower.
Demote leader replica as follower .
&self
replica
Replica