aboutsummaryrefslogtreecommitdiff
path: root/src/membership.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-09 18:43:53 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-09 18:43:53 +0200
commit1d786c2c663ac6f6e3e3ef52accd6e9eca049988 (patch)
tree813720a682fe7cf4947129020d73ccf4797d0c3a /src/membership.rs
parent101444abb3967770ec378ee09f24eb2845dc091d (diff)
downloadgarage-1d786c2c663ac6f6e3e3ef52accd6e9eca049988.tar.gz
garage-1d786c2c663ac6f6e3e3ef52accd6e9eca049988.zip
Something works
Diffstat (limited to 'src/membership.rs')
-rw-r--r--src/membership.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/membership.rs b/src/membership.rs
index e1eeae41..314495e9 100644
--- a/src/membership.rs
+++ b/src/membership.rs
@@ -45,6 +45,7 @@ pub struct NodeStatus {
pub remaining_ping_attempts: usize,
}
+#[derive(Debug)]
pub struct RingEntry {
pub location: Hash,
pub node: UUID,
@@ -109,6 +110,12 @@ impl Members {
new_ring.sort_unstable_by(|x, y| x.location.cmp(&y.location));
self.ring = new_ring;
self.n_datacenters = datacenters.len();
+
+ eprintln!("RING: --");
+ for e in self.ring.iter() {
+ eprintln!("{:?}", e);
+ }
+ eprintln!("END --");
}
pub fn walk_ring(&self, from: &Hash, n: usize) -> Vec<UUID> {
@@ -200,7 +207,7 @@ impl System {
path.push("network_config");
let members = self.members.read().await;
- let data = rmp_serde::encode::to_vec_named(&members.config)
+ let data = rmp_to_vec_all_named(&members.config)
.expect("Error while encoding network config");
drop(members);