pub struct PreferredLeaderChange {
pub new_leader: u64,
pub preferred_replica: Option<u64>,
pub leader_in_isr: bool,
pub leader_alive: bool,
pub leader_is_witness: bool,
}Expand description
What a preferred-leader rebalance scan observed about one change it wants to submit.
The host reads every fact off the change record itself and the scan’s liveness and witness snapshots, not off the election that produced it, so the kernel checks the election’s output rather than restating it.
Fields§
§new_leader: u64The leader the change installs.
preferred_replica: Option<u64>The partition’s preferred replica, replicas[0], or None for an
empty assignment.
leader_in_isr: boolThe new leader is in the change’s ISR.
leader_alive: boolThe new leader is alive in the scan’s liveness snapshot.
leader_is_witness: boolThe new leader carries the witness role, so it may never lead.
Trait Implementations§
Source§impl Clone for PreferredLeaderChange
impl Clone for PreferredLeaderChange
Source§fn clone(&self) -> PreferredLeaderChange
fn clone(&self) -> PreferredLeaderChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PreferredLeaderChange
Source§impl Debug for PreferredLeaderChange
impl Debug for PreferredLeaderChange
impl Eq for PreferredLeaderChange
Source§impl PartialEq for PreferredLeaderChange
impl PartialEq for PreferredLeaderChange
impl StructuralPartialEq for PreferredLeaderChange
Auto Trait Implementations§
impl Freeze for PreferredLeaderChange
impl RefUnwindSafe for PreferredLeaderChange
impl Send for PreferredLeaderChange
impl Sync for PreferredLeaderChange
impl Unpin for PreferredLeaderChange
impl UnsafeUnpin for PreferredLeaderChange
impl UnwindSafe for PreferredLeaderChange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more