Skip to main content

Follower

Struct Follower 

Source
pub struct Follower { /* private fields */ }
Expand description

The twin’s loop over one source into one set of stores.

Implementations§

Source§

impl Follower

Source

pub fn new(stores: Arc<ServerStores>, source: Box<dyn LogSource>) -> Self

A follower of source into stores.

Source

pub fn with_volume(self, volume: Arc<dyn Volume>) -> Self

Stage snapshots on volume instead of the box’s own filesystem (the tests’ capped volume, twin-resync-space 2026-10-06).

Source

pub fn sharing_failures(self, failures: Arc<Mutex<Option<Failing>>>) -> Self

Share the run of failures with the follower before this one (the supervisor’s re-dial starts a new follower on the same primary: the run goes on).

Source

pub fn with_fetch_bytes(self, bytes: u64) -> Self

How many blob bytes one fetch asks for (tests ask for tiny fetches to exercise the restart-mid-range path).

Source

pub fn applied_seq(&self) -> u64

The twin’s own head.

Source

pub fn step(&self) -> Result<Progress>

One poll: head, the gap rule, fetch-append-apply until level.

A poll that reached the primary and then failed says so in the status (2026-09-21, lane T4). Only the head() call used to set a status on failure. Everything after it — append_at on a full volume, an apply that will not go in, a fetch that dies mid-range — propagated with ?, and the STATUS WAS LEFT EXACTLY AS THE LAST GOOD POLL SET IT: following, often caught_up, with an empty why. run logged one warn and polled again. So the shape a twin’s life actually ends in — its data volume filling — read as a healthy, current copy on both twin status and the primary’s heartbeat, for as long as the box stayed up. A twin’s whole job is to be trustworthy at the moment nobody has time to check.

Source

pub fn run(&self, poll: Duration, stop: &AtomicBool) -> Ended

Poll until stop; an unreachable primary is retried every poll, a snapshot-needed stops the loop and leaves the status saying so. What it returns says why it returned (Ended).

Source

pub fn maintenance_beat(&self)

One poll while this twin grows its own set: the status says maintenance FIRST (so the report on this very poll carries the word), then the primary is asked for its head only — nothing is fetched, appended or applied, so nothing touches the unmounted set.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more