pub struct RoleWeightedQuorum {
pub weights: HashMap<String, u32>,
pub min_quorum_weight: u32,
}Expand description
RoleWeightedQuorum: weights survival by role importance rather than raw node count.
Each role carries a weight. A member’s weight is the max weight
among its roles (0 if it holds no weighted role). The reachable side
survives (DownUnreachable) iff the sum of its Up members’ weights is
at least min_quorum_weight; otherwise this node steps down
(DownSelf).
This lets a numerically larger partition that happens to lack the
heavyweight (core) roles be the side that is downed — see the
role_weighted_* tests.
Fields§
§weights: HashMap<String, u32>§min_quorum_weight: u32Implementations§
Trait Implementations§
Source§impl Clone for RoleWeightedQuorum
impl Clone for RoleWeightedQuorum
Source§fn clone(&self) -> RoleWeightedQuorum
fn clone(&self) -> RoleWeightedQuorum
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 moreSource§impl Debug for RoleWeightedQuorum
impl Debug for RoleWeightedQuorum
Source§impl Default for RoleWeightedQuorum
impl Default for RoleWeightedQuorum
Source§fn default() -> RoleWeightedQuorum
fn default() -> RoleWeightedQuorum
Returns the “default value” for a type. Read more
Source§impl DowningStrategy for RoleWeightedQuorum
impl DowningStrategy for RoleWeightedQuorum
Auto Trait Implementations§
impl Freeze for RoleWeightedQuorum
impl RefUnwindSafe for RoleWeightedQuorum
impl Send for RoleWeightedQuorum
impl Sync for RoleWeightedQuorum
impl Unpin for RoleWeightedQuorum
impl UnsafeUnpin for RoleWeightedQuorum
impl UnwindSafe for RoleWeightedQuorum
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