pub struct ReplicaState {
pub id: String,
pub last_acked_lsn: u64,
pub last_sent_lsn: u64,
pub last_durable_lsn: u64,
pub apply_error_count: u64,
pub divergence_count: u64,
pub connected_at_unix_ms: u128,
pub last_seen_at_unix_ms: u128,
pub region: Option<String>,
pub rebootstrapping: bool,
}Expand description
State of a connected replica. PLAN.md Phase 11.4 fields:
last_seen_at_unix_ms updates on every interaction (pull or ack);
last_sent_lsn updates when the primary serves a pull_wal_records
batch; last_durable_lsn updates when the replica reports its WAL
is durably written via ack_replica_lsn.
Fields§
§id: String§last_acked_lsn: u64§last_sent_lsn: u64§last_durable_lsn: u64§apply_error_count: u64§divergence_count: u64§connected_at_unix_ms: u128§last_seen_at_unix_ms: u128§region: Option<String>Region identifier declared by the replica at handshake time
(Phase 2.6 multi-region PG parity). None until the replica
handshake extension lands in 2.6.2; the quorum coordinator’s
region-binding map covers the in-process case meanwhile.
rebootstrapping: booltrue while this replica is re-bootstrapping — loading a fresh
snapshot to replace its current dataset (issue #837). It keeps
serving non-causal reads from the old data, but the advertiser
surfaces this flag so a causal reader routes bookmark reads
elsewhere: the replica’s last_acked_lsn describes data it is
about to discard. Cleared atomically when the swap completes.
Trait Implementations§
Source§impl Clone for ReplicaState
impl Clone for ReplicaState
Source§fn clone(&self) -> ReplicaState
fn clone(&self) -> ReplicaState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReplicaState
impl RefUnwindSafe for ReplicaState
impl Send for ReplicaState
impl Sync for ReplicaState
impl Unpin for ReplicaState
impl UnsafeUnpin for ReplicaState
impl UnwindSafe for ReplicaState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> 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