struct RetirementFrontier {
highest_retired: Option<SsaIndex>,
registered: HashSet<SsaIndex>,
retriable: HashSet<SsaIndex>,
recovered_tail: Option<RecoveredSsaTail>,
}Expand description
Compact retirement state for one Session.
highest_retired alone is not enough: a later member of a batch may retire while an earlier
member is still live. The exception sets retain only indices that still own a registration or
were released before going live and may be retried. Live registrations are bounded by the
Session layer’s generation limit; a failed pre-live request closes a production Session, whose
scope releases its retriable entries. The number of completed cycles is represented by one
watermark rather than one allocation each.
Fields§
§highest_retired: Option<SsaIndex>§registered: HashSet<SsaIndex>§retriable: HashSet<SsaIndex>§recovered_tail: Option<RecoveredSsaTail>The most recently recovered cycle’s bounded liveness tail.
One slot is sufficient and security-critical: the Entry emits cycles in index order, so only the immediate recovered predecessor can legitimately remain in the Exit’s FIFO. A newer recovered cycle replaces it, preventing old shares from buying service indefinitely while keeping retirement memory constant over the Session’s lifetime.
Implementations§
Source§impl RetirementFrontier
impl RetirementFrontier
fn is_retired(&self, index: SsaIndex) -> bool
fn register(&mut self, index: SsaIndex) -> bool
Sourcefn abandon(&mut self, index: SsaIndex)
fn abandon(&mut self, index: SsaIndex)
Releases a registration that never went live while leaving its index reusable.
Sourcefn retire(&mut self, index: SsaIndex) -> bool
fn retire(&mut self, index: SsaIndex) -> bool
Retires a known registration and raises the compact watermark.
Returning false for an unknown index is load-bearing: allowing an arbitrary retire_ssa
call to raise the watermark would condemn legitimate lower indices that are registered
later.
fn retire_recovered(&mut self, index: SsaIndex, tail: RecoveredSsaTail) -> bool
Trait Implementations§
Source§impl Default for RetirementFrontier
impl Default for RetirementFrontier
Source§fn default() -> RetirementFrontier
fn default() -> RetirementFrontier
Auto Trait Implementations§
impl Freeze for RetirementFrontier
impl RefUnwindSafe for RetirementFrontier
impl Send for RetirementFrontier
impl Sync for RetirementFrontier
impl Unpin for RetirementFrontier
impl UnsafeUnpin for RetirementFrontier
impl UnwindSafe for RetirementFrontier
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more