Skip to main content

FailoverWatchdog

Struct FailoverWatchdog 

Source
pub struct FailoverWatchdog<'a> {
    pub table: &'a HeartbeatTable,
    pub grace_epochs: u64,
}
Expand description

Watchdog scanner; one per cooperating cluster.

Fields§

§table: &'a HeartbeatTable§grace_epochs: u64

Implementations§

Source§

impl<'a> FailoverWatchdog<'a>

Source

pub fn new(table: &'a HeartbeatTable) -> Self

Source

pub fn with_grace(table: &'a HeartbeatTable, grace_epochs: u64) -> Self

Source

pub fn scan(&self) -> ReclaimReport

Advance global epoch and scan every slot. Returns a report of slots whose last beat is more than grace_epochs behind the new global epoch.

Per-scan observation is pushed to the underlying HeartbeatTable’s sidecar ring rather than a separate watchdog-owned ring: the watchdog borrows the table with lifetime 'a, which is incompatible with the AdaptiveInstance: 'static trait bound. Routing the scan observation through the table preserves visibility to any policy attached at that level.

Source

pub fn iter_in_flight_bits(bitmap: u64) -> impl Iterator<Item = u8>

Iterate the set bits in bitmap, returning each bit’s position. Used by callers reclaiming an in_flight_bitmap.

Source

pub fn clear_dead_bitmap(&self, slot_idx: usize)

Clear the dead process’s bitmap so subsequent scans don’t re-report it. Typically called by the caller after they have reassigned the work.

Auto Trait Implementations§

§

impl<'a> Freeze for FailoverWatchdog<'a>

§

impl<'a> RefUnwindSafe for FailoverWatchdog<'a>

§

impl<'a> Send for FailoverWatchdog<'a>

§

impl<'a> Sync for FailoverWatchdog<'a>

§

impl<'a> Unpin for FailoverWatchdog<'a>

§

impl<'a> UnsafeUnpin for FailoverWatchdog<'a>

§

impl<'a> UnwindSafe for FailoverWatchdog<'a>

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<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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.