Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nodedb-cluster/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ thiserror = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true }
rand = { workspace = true }
async-trait = { workspace = true }

# Serialization (compact binary for RPCs — matches nexar wire format)
rkyv = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions nodedb-cluster/src/bootstrap/bootstrap_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ mod tests {
data_dir: _dir.path().to_path_buf(),
force_bootstrap: false,
join_retry: Default::default(),
swim_udp_addr: None,
};

let state = bootstrap(&config, &catalog).unwrap();
Expand Down
7 changes: 7 additions & 0 deletions nodedb-cluster/src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ pub struct ClusterConfig {
/// (`8` attempts, `32 s` ceiling). Tests override this with a
/// faster policy.
pub join_retry: JoinRetryPolicy,
/// Optional UDP bind address for the SWIM failure detector. `None`
/// disables SWIM entirely — cluster startup then relies solely on
/// the existing raft transport for membership observations. When
/// `Some`, the operator is expected to spawn SWIM separately via
/// [`crate::spawn_swim`] after the cluster is up and feed the
/// seed list from `seed_nodes`.
pub swim_udp_addr: Option<SocketAddr>,
}

/// Result of cluster startup — everything needed to run the Raft loop.
Expand Down
2 changes: 2 additions & 0 deletions nodedb-cluster/src/bootstrap/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ mod tests {
data_dir: _dir1.path().to_path_buf(),
force_bootstrap: false,
join_retry: Default::default(),
swim_udp_addr: None,
};
let state1 = bootstrap(&config1, &catalog1).unwrap();

Expand Down Expand Up @@ -497,6 +498,7 @@ mod tests {
data_dir: _dir2.path().to_path_buf(),
force_bootstrap: false,
join_retry: Default::default(),
swim_udp_addr: None,
};

let lifecycle = ClusterLifecycleTracker::new();
Expand Down
1 change: 1 addition & 0 deletions nodedb-cluster/src/bootstrap/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ mod tests {
data_dir: std::env::temp_dir(),
force_bootstrap: false,
join_retry: Default::default(),
swim_udp_addr: None,
}
}

Expand Down
1 change: 1 addition & 0 deletions nodedb-cluster/src/bootstrap/restart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ mod tests {
data_dir: _dir.path().to_path_buf(),
force_bootstrap: false,
join_retry: Default::default(),
swim_udp_addr: None,
};

// Bootstrap first.
Expand Down
5 changes: 4 additions & 1 deletion nodedb-cluster/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ pub use lifecycle::{
pub use rdma_transport::{RdmaConfig, RdmaTransport};
pub use rebalance_scheduler::{NodeMetrics, RebalanceScheduler, RebalanceTrigger, SchedulerConfig};
pub use shard_split::{SplitPlan, SplitStrategy, plan_graph_split, plan_vector_split};
pub use swim::{Incarnation, Member, MemberState, MembershipList, SwimConfig, SwimError};
pub use swim::{
Incarnation, Member, MemberState, MembershipList, SwimConfig, SwimError, SwimHandle,
UdpTransport, spawn as spawn_swim,
};
Loading
Loading