diff options
| author | tv <tv@krebsco.de> | 2026-10-21 14:38:49 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-21 14:38:49 +0200 |
| commit | b9782f827229b9e3e6053e065229cfef0e7983c3 (patch) | |
| tree | e1320fcbf7eca0e8bc41a28f619c182f15b51e61 /src/remake/records.rs | |
| parent | f85728a72eb756c9e260c6afbdfab961ed414566 (diff) | |
make remake switch delay configurable
Diffstat (limited to 'src/remake/records.rs')
| -rw-r--r-- | src/remake/records.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/remake/records.rs b/src/remake/records.rs index 9edca6e..600d4dc 100644 --- a/src/remake/records.rs +++ b/src/remake/records.rs @@ -123,6 +123,10 @@ pub(crate) struct Proposal { pub(crate) settle_ms: u64, pub(crate) proposed_at: u64, pub(crate) settle_until: u64, + /// How long nodes wait after seeing the commit before switching (ms); one keepalive + /// interval if absent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub(crate) switch_delay_ms: Option<u64>, /// Peers that must stay active during the settle period. pub(crate) peers_considered: Vec<String>, /// The remake kind (`compact` for records written before kinds existed). @@ -355,6 +359,7 @@ mod tests { settle_ms: 1_000, proposed_at: settle_until.saturating_sub(1_000), settle_until, + switch_delay_ms: None, peers_considered: vec!["node-b".into()], kind: DEFAULT_KIND.to_owned(), content: JsonValue::Null, |
