pub struct ReplicationStatusEntry {
pub status: ReplicationStatus,
pub generation: u64,
pub recorded_at: DateTime<Utc>,
}Expand description
Per-(source_bucket, source_key) replication status entry, paired with the generation token of the source PUT that produced it.
§v0.8.2 #61 — generation token
Each put_object (or complete_multipart_upload) on a source key
pulls a fresh, monotonically-increasing generation from the
manager. The detached replication task carries that generation and
only stamps the status when its generation is >= the stored one
(CAS-style). A stale retry whose generation has been overtaken by a
newer PUT is silently dropped, so the destination bucket never gets
rolled back to older bytes. See ReplicationManager::next_generation
§v0.8.3 #66 — recorded_at for sweep + TTL (H-5 audit fix)
Each stamp records the wall-clock time the entry was last updated.
The hourly sweep task (ReplicationManager::sweep_stale) drops
terminal entries (Completed / Failed) older than the operator-
configured TTL, bounding the otherwise-unbounded growth of the
statuses map under workloads with many unique keys. Pending
entries are never swept (they are still in-flight and dropping them
would lose the eventual Completed / Failed stamp the dispatcher
is racing toward). Pre-#66 snapshots without recorded_at deserialise
with Utc::now() (= “freshly observed at restart”) which delays
the first sweep by one TTL cycle but never drops a still-relevant
entry early.
Fields§
§status: ReplicationStatus§generation: u64§recorded_at: DateTime<Utc>v0.8.3 #66: when the entry was last updated. The sweep drops
terminal entries (Completed / Failed) older than the operator-
configured TTL. Pending entries are never swept (still in-flight).
Pre-#66 snapshots default to Utc::now() so legacy entries get
one full TTL window of grace before becoming sweep-eligible.
Trait Implementations§
Source§impl Clone for ReplicationStatusEntry
impl Clone for ReplicationStatusEntry
Source§fn clone(&self) -> ReplicationStatusEntry
fn clone(&self) -> ReplicationStatusEntry
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 ReplicationStatusEntry
impl Debug for ReplicationStatusEntry
Source§impl<'de> Deserialize<'de> for ReplicationStatusEntry
impl<'de> Deserialize<'de> for ReplicationStatusEntry
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 ReplicationStatusEntry
impl PartialEq for ReplicationStatusEntry
Source§fn eq(&self, other: &ReplicationStatusEntry) -> bool
fn eq(&self, other: &ReplicationStatusEntry) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ReplicationStatusEntry
impl Serialize for ReplicationStatusEntry
impl Eq for ReplicationStatusEntry
impl StructuralPartialEq for ReplicationStatusEntry
Auto Trait Implementations§
impl Freeze for ReplicationStatusEntry
impl RefUnwindSafe for ReplicationStatusEntry
impl Send for ReplicationStatusEntry
impl Sync for ReplicationStatusEntry
impl Unpin for ReplicationStatusEntry
impl UnsafeUnpin for ReplicationStatusEntry
impl UnwindSafe for ReplicationStatusEntry
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<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.