pub enum ShadowStep {
Begin,
Fill {
after: Option<String>,
},
Swap {
build_start: String,
epoch: u64,
},
}Expand description
One step of a chunked rebuild, as sent to the actor.
Three commands rather than one because each must be its own turn — the
whole point is that the actor returns to its select! between chunks, so a
high-priority assertion can jump ahead. A loop inside one command would
produce the same small transactions inside one hold and buy nothing, which is
the same trap Database::archive_windowed
avoids.
Variants§
Begin
Drop any orphan shadow, create a fresh one from the declared DDL.
Fill
Project the next [SOURCES_PER_CHUNK] sources into the shadow.
Swap
Catch up on writes since build_start, then swap. One transaction.
epoch is the archive count ShadowOutcome::Started reported. It
travels out to the caller and back rather than being remembered by the
actor: the actor is stateless per command by construction, and a single
remembered slot would be shared — and silently corrupted — by two
rebuilds running at once.
Trait Implementations§
Source§impl Clone for ShadowStep
impl Clone for ShadowStep
Source§fn clone(&self) -> ShadowStep
fn clone(&self) -> ShadowStep
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 ShadowStep
impl Debug for ShadowStep
impl Eq for ShadowStep
Source§impl PartialEq for ShadowStep
impl PartialEq for ShadowStep
impl StructuralPartialEq for ShadowStep
Auto Trait Implementations§
impl Freeze for ShadowStep
impl RefUnwindSafe for ShadowStep
impl Send for ShadowStep
impl Sync for ShadowStep
impl Unpin for ShadowStep
impl UnsafeUnpin for ShadowStep
impl UnwindSafe for ShadowStep
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
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<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<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> 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