pub struct SplitPlan {
pub source: TabletDescriptor,
pub children: [ChildPlan; 2],
pub split_key: Key,
pub split_ts: HlcTimestamp,
}Expand description
One split: the source (pre-Splitting, at its initiation generation g),
the two children (lower half first), the split key, and the pinned split
timestamp.
Fields§
§source: TabletDescriptorThe source tablet as it was at initiation (Active, generation g).
children: [ChildPlan; 2]The children, lower half first; their bounds meet at split_key.
split_key: KeyThe chosen split key.
split_ts: HlcTimestampThe timestamp the source snapshot is pinned at.
Implementations§
Source§impl SplitPlan
impl SplitPlan
Sourcepub fn validate(&self) -> Result<(), SplitError>
pub fn validate(&self) -> Result<(), SplitError>
Structural validation: the split key partitions the source exactly into the child bounds, ids are fresh and distinct, and the creation-time child descriptors are structurally valid.
Sourcepub fn child_descriptors(&self) -> [TabletDescriptor; 2]
pub fn child_descriptors(&self) -> [TabletDescriptor; 2]
The child descriptors as created in step 3: Creating at the
inception generation (g + 1), every replica a learner. Creating
tablets are never routed to (spec section 12.5).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SplitPlan
impl RefUnwindSafe for SplitPlan
impl Send for SplitPlan
impl Sync for SplitPlan
impl Unpin for SplitPlan
impl UnsafeUnpin for SplitPlan
impl UnwindSafe for SplitPlan
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
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,
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::Request