pub enum TabletState {
Creating,
Active,
Splitting,
Merging,
Retiring,
Retired,
}Expand description
Lifecycle state of a tablet (spec sections 12.1, 12.5, 12.6). Declaration order is frozen; variants are never reused (spec section 4.10).
Variants§
Creating
Created as learners and catching up; never routed to (spec section 12.5: do not expose child tablets before catch-up).
Active
Serving traffic.
Splitting
Split in flight: the source remains the routable owner until the children are published atomically (spec section 12.5).
Merging
Merge in flight: the sources remain routable until the hidden replacement is published atomically (spec section 12.6).
Retiring
Retired from routing by an atomic publication; retained until no old-generation requests or pins remain (spec section 12.5 step 10).
Retired
Fully retired; replicas may be removed. Terminal: tablet identifiers are never reused (spec section 7).
Implementations§
Source§impl TabletState
impl TabletState
Sourcepub fn can_transition_to(self, next: Self) -> bool
pub fn can_transition_to(self, next: Self) -> bool
Whether the transition self -> next is permitted.
The graph (enforced here, applied at quorum by the meta group):
Creating -> Active | Retired (catch-up done / creation aborted)
Active -> Splitting | Merging | Retiring
Splitting -> Active | Retiring (split aborted / children published)
Merging -> Active | Retiring (merge aborted / replacement published)
Retiring -> Retired (no old-generation pins remain)
Retired -> (terminal)Sourcepub fn is_routable(self) -> bool
pub fn is_routable(self) -> bool
Whether requests may be routed to this tablet: the serving owner
(Active) and the sources of an in-flight split or merge, which stay
authoritative until the atomic publication flips them to
TabletState::Retiring. Creating tablets are never exposed (spec
section 12.5).
Trait Implementations§
Source§impl Clone for TabletState
impl Clone for TabletState
Source§fn clone(&self) -> TabletState
fn clone(&self) -> TabletState
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 TabletState
Source§impl Debug for TabletState
impl Debug for TabletState
Source§impl<'de> Deserialize<'de> for TabletState
impl<'de> Deserialize<'de> for TabletState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for TabletState
impl Display for TabletState
impl Eq for TabletState
Source§impl Hash for TabletState
impl Hash for TabletState
Source§impl PartialEq for TabletState
impl PartialEq for TabletState
Source§impl Serialize for TabletState
impl Serialize for TabletState
impl StructuralPartialEq for TabletState
Auto Trait Implementations§
impl Freeze for TabletState
impl RefUnwindSafe for TabletState
impl Send for TabletState
impl Sync for TabletState
impl Unpin for TabletState
impl UnsafeUnpin for TabletState
impl UnwindSafe for TabletState
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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