Skip to main content

ClusterSignals

Trait ClusterSignals 

Source
pub trait ClusterSignals {
    // Required methods
    fn member_signals(&self, member: &NodeIdentity) -> MemberSignals;
    fn commit_watermark(
        &self,
        collection: &CollectionId,
        range_id: RangeId,
    ) -> CommitWatermark;
    fn catch_up(
        &self,
        collection: &CollectionId,
        range_id: RangeId,
        candidate: &NodeIdentity,
    ) -> Option<CatchUpEvidence>;
}
Expand description

The cluster state the supervisor reads but does not own: per-member health signals, per-range commit watermarks, and per-candidate catch-up evidence.

Production backs this onto the heartbeat tracker, the replica registry, and the per-range stream progress (issue #992); tests back it onto a scripted fake. Keeping it behind a trait is what makes the supervisor a pure policy.

Required Methods§

Source

fn member_signals(&self, member: &NodeIdentity) -> MemberSignals

Current raw health signals for member.

Source

fn commit_watermark( &self, collection: &CollectionId, range_id: RangeId, ) -> CommitWatermark

The range commit watermark a promotion candidate must cover for (collection, range_id) — the highest (term, lsn) known durable under the range’s commit policy.

Source

fn catch_up( &self, collection: &CollectionId, range_id: RangeId, candidate: &NodeIdentity, ) -> Option<CatchUpEvidence>

The catch-up evidence the supervisor has for candidate on the range, or None if the candidate’s progress is unknown (in which case it cannot be promoted — fail closed).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§