Skip to main content

Observed

Type Alias Observed 

Source
pub type Observed = EpochState;

Aliased Type§

pub struct Observed {
    pub holder_id: String,
    pub epoch: u64,
    pub token: String,
    pub last_renew_unix: Option<u64>,
    pub echo: Option<String>,
    pub released: bool,
    pub waiters: Vec<String>,
    pub handoff: Option<String>,
}

Fields§

§holder_id: String§epoch: u64§token: String

Backend token guarding the next transition (S3: the epoch object’s ETag; Azure: the lease id).

§last_renew_unix: Option<u64>

The store’s own clock for the last renewal (S3 Last-Modified) — A8: takeover is judged against the STORE’s clock, not ours.

§echo: Option<String>

An opaque observed-state echo the holder wrote with its last heartbeat, if any ([LeaseEcho]). Read-only to everyone but the holder: it is the ONE fleet-visible surface that reports what a syncer is actually doing rather than what its spec asked for, and it costs nothing — the heartbeat CAS was already happening. None = the holder wrote none (an older binary, a clean release, or a backend that cannot carry it).

§released: bool

The holder shut down cleanly and will never publish under this epoch again — a successor supersedes immediately instead of waiting out the lease. Written by [ObjectStore::epoch_release].

§waiters: Vec<String>

The FIFO of holders waiting for the cell (lean’s per-barrier lease, design 2026-09-13 §4.2). A claimant that finds the cell held, or released-and-handed to someone else, appends itself ONCE ([ObjectStore::epoch_enqueue]); the holder’s handoff pops the head into handoff. Empty on every cell written by a holder that never queues (the tier hub), which degrades to today’s behaviour and never to a second holder.

§handoff: Option<String>

Who a RELEASED cell is reserved for: the queue head at the time of the handoff. Only that holder may acquire it — or anyone, once it has been quiet long enough to be judged dead. None = first come, first served.