pub enum MemberState {
Active,
Draining,
}Expand description
A member’s lifecycle state in the cluster (issue #1000, PRD #987).
A member is Active for its whole serving life; planned
removal first marks it Draining via
MembershipCatalog::begin_drain. The distinction drives two rules of the
cluster drain flow (super::drain): a draining member stops receiving new
range placements, and its ranges are scheduled off it through ordinary
ownership transitions before membership is finally removed. The state is
cluster-membership lifecycle, separate from per-range health
(HealthClass): a draining member can be
perfectly healthy, and an unhealthy member is not automatically draining.
Variants§
Active
Fully serving: may own and replicate ranges and receive new placements.
Draining
Marked for planned removal: holds its current ranges until they are moved off, but receives no new range placements. The terminal state before the member is removed from the catalog.
Implementations§
Source§impl MemberState
impl MemberState
Sourcepub fn accepts_new_placements(self) -> bool
pub fn accepts_new_placements(self) -> bool
Whether a member in this state may receive new range placements. Only an
Active member may; a draining member is excluded so drain
never has to chase ranges it just handed back. This is the “a draining
member stops receiving new range placements” rule.
Trait Implementations§
Source§impl Clone for MemberState
impl Clone for MemberState
Source§fn clone(&self) -> MemberState
fn clone(&self) -> MemberState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MemberState
Source§impl Debug for MemberState
impl Debug for MemberState
impl Eq for MemberState
Source§impl PartialEq for MemberState
impl PartialEq for MemberState
Source§fn eq(&self, other: &MemberState) -> bool
fn eq(&self, other: &MemberState) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MemberState
Auto Trait Implementations§
impl Freeze for MemberState
impl RefUnwindSafe for MemberState
impl Send for MemberState
impl Sync for MemberState
impl Unpin for MemberState
impl UnsafeUnpin for MemberState
impl UnwindSafe for MemberState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request