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: u64Implementations§
Source§impl<'a> FailoverWatchdog<'a>
impl<'a> FailoverWatchdog<'a>
pub fn new(table: &'a HeartbeatTable) -> Self
pub fn with_grace(table: &'a HeartbeatTable, grace_epochs: u64) -> Self
Sourcepub fn scan(&self) -> ReclaimReport
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.
Sourcepub fn iter_in_flight_bits(bitmap: u64) -> impl Iterator<Item = u8>
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.
Sourcepub fn clear_dead_bitmap(&self, slot_idx: usize)
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.