Skip to content
Discussion options

You must be logged in to vote

Get RaftMetrics via Raft::metrics() on the leader node.

With OpenRaft 0.9:
In RaftMetrics:
https://docs.rs/openraft/0.9.21/openraft/metrics/struct.RaftMetrics.html

If pub replication: Option<BTreeMap<NID, Option<LogId<NID>>>> lags significantly behind pub last_log_index: Option<u64>, it means replication to this node has issues and the node may be down.

With OpenRaft 0.10, there is another way:
In RaftMetrics:

pub heartbeat: Option<HeartbeatMetrics<C>>,

type HeartbeatMetrics = BTreeMap<NodeIdOf<C>, Option<SerdeInstantOf<C>>> stores the timestamp of the last acknowledgment from a node. If this…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iMashtak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants