pub struct SplitPublishCommand {
pub source: TabletDescriptor,
pub children: [TabletDescriptor; 2],
pub split_key: Key,
pub split_ts: HlcTimestamp,
}Expand description
The two-phase routing publication of one split, applied by the meta group
as ONE command (spec section 12.5 step 8): the children become Active
and the source becomes Retiring atomically at one new generation. Never
proposed before the children are caught up (the executor’s phase machine
is the barrier of step 7).
This is the shape the meta wave adopts as a meta command; the reference
TabletMetaPlane::publish_split applies its semantics.
Fields§
§source: TabletDescriptorThe source, republished Retiring at the publication generation.
children: [TabletDescriptor; 2]The children, published Active at the publication generation, lower
half first. Publication promotes the caught-up learners to voters
(the Raft membership change rides the same meta command in the
runtime wave).
split_key: KeyThe split key the child bounds meet at.
split_ts: HlcTimestampThe pinned split timestamp the children were built at.
Implementations§
Source§impl SplitPublishCommand
impl SplitPublishCommand
Sourcepub fn from_plan(plan: &SplitPlan) -> Result<Self, SplitError>
pub fn from_plan(plan: &SplitPlan) -> Result<Self, SplitError>
Builds the publication of plan: the source transitions
Splitting -> Retiring and the children Creating -> Active, all at
the publication generation (g + 2, see the generation rules on
TabletDescriptor).
Sourcepub fn publish_generation(&self) -> u64
pub fn publish_generation(&self) -> u64
The generation the publication assigns to all three descriptors.
Sourcepub fn validate(&self) -> Result<(), SplitError>
pub fn validate(&self) -> Result<(), SplitError>
Structural validation of the atomic publication: states and the shared
generation, one table, and child bounds that partition the source
exactly at split_key.
Trait Implementations§
Source§impl Clone for SplitPublishCommand
impl Clone for SplitPublishCommand
Source§fn clone(&self) -> SplitPublishCommand
fn clone(&self) -> SplitPublishCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SplitPublishCommand
impl Debug for SplitPublishCommand
Source§impl<'de> Deserialize<'de> for SplitPublishCommand
impl<'de> Deserialize<'de> for SplitPublishCommand
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 PartialEq for SplitPublishCommand
impl PartialEq for SplitPublishCommand
Source§impl Serialize for SplitPublishCommand
impl Serialize for SplitPublishCommand
impl StructuralPartialEq for SplitPublishCommand
Auto Trait Implementations§
impl Freeze for SplitPublishCommand
impl RefUnwindSafe for SplitPublishCommand
impl Send for SplitPublishCommand
impl Sync for SplitPublishCommand
impl Unpin for SplitPublishCommand
impl UnsafeUnpin for SplitPublishCommand
impl UnwindSafe for SplitPublishCommand
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<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