MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / cluster_size

Method cluster_size

nodedb-raft/src/node/config.rs:70–72  ·  view source on GitHub ↗

Total number of voters (self + voter peers). Learners are excluded. This value drives quorum math and so must never grow transiently while the learner is catching up — that is exactly the safety property the learner phase is designed to give.

(&self)

Source from the content-addressed store, hash-verified

68 /// never grow transiently while the learner is catching up — that is
69 /// exactly the safety property the learner phase is designed to give.
70 pub fn cluster_size(&self) -> usize {
71 self.peers.len() + 1
72 }
73
74 /// Quorum size: `floor(n/2) + 1` over the voter set.
75 pub fn quorum(&self) -> usize {

Callers 3

quorumMethod · 0.80
become_leaderMethod · 0.80
proposeMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected