pub enum ReplicationConfigError {
FactorBelowMin {
got: u8,
min: u8,
},
FactorAboveMax {
got: u8,
max: u8,
},
HeartbeatTooLow {
got: u64,
min: u64,
},
HeartbeatTooHigh {
got: u64,
max: u64,
},
BudgetFractionOutOfRange {
got: f32,
},
BackgroundFractionOutOfRange {
got: f32,
},
PinnedSetEmpty,
PinnedSetTooLarge {
got: usize,
max: usize,
},
PinnedDuplicate {
node_id: NodeId,
},
LeaderPinnedOutsidePinnedSet {
leader: NodeId,
},
}Expand description
Reject reasons surfaced by ReplicationConfig::validate.
Not Eq — the Self::BudgetFractionOutOfRange variant carries
an f32, which is PartialEq but not Eq.
Variants§
FactorBelowMin
factor is below the REPLICATION_FACTOR_MIN floor.
FactorAboveMax
factor is above the REPLICATION_FACTOR_MAX ceiling.
HeartbeatTooLow
heartbeat_ms is below the HEARTBEAT_MS_MIN floor.
HeartbeatTooHigh
heartbeat_ms is above the HEARTBEAT_MS_MAX ceiling.
Pathological values let
heartbeat_ms.saturating_mul(miss_threshold) saturate to
u64::MAX, silently disabling silence detection.
BudgetFractionOutOfRange
replication_budget_fraction is outside (0.0, 1.0] or
non-finite (NaN / ±inf).
BackgroundFractionOutOfRange
background_fraction is outside [0.0, 1.0) or non-finite.
1.0 is rejected because it would deny every Background
request unconditionally.
PinnedSetEmpty
PlacementStrategy::Pinned supplied an empty Vec<NodeId>.
Pinned placement needs at least one node; if the operator
wanted “no replication” they should leave
RedexFileConfig::replication at None instead.
PinnedSetTooLarge
PlacementStrategy::Pinned supplied more than
REPLICATION_FACTOR_MAX nodes.
PinnedDuplicate
A NodeId appears more than once in the pinned set.
LeaderPinnedOutsidePinnedSet
leader_pinned names a node that isn’t in the pinned set —
the operator pinned a leader on a node that won’t even run a
replica.
Trait Implementations§
Source§impl Debug for ReplicationConfigError
impl Debug for ReplicationConfigError
Source§impl Display for ReplicationConfigError
impl Display for ReplicationConfigError
Source§impl Error for ReplicationConfigError
impl Error for ReplicationConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ReplicationConfigError
impl PartialEq for ReplicationConfigError
Source§fn eq(&self, other: &ReplicationConfigError) -> bool
fn eq(&self, other: &ReplicationConfigError) -> bool
self and other values to be equal, and is used by ==.