summaryrefslogtreecommitdiffstats
path: root/src/remake/records.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/records.rs')
-rw-r--r--src/remake/records.rs5
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,