From c81eb5d3f7aa80cadd7abfdb3341a6070d82633b Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Mon, 21 Oct 2024 19:58:31 +0900 Subject: [PATCH] Updating chitchat --- quickwit/Cargo.lock | 4 ++-- quickwit/Cargo.toml | 2 +- quickwit/quickwit-cluster/src/cluster.rs | 15 ++++++--------- .../quickwit-serve/src/developer_api/server.rs | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/quickwit/Cargo.lock b/quickwit/Cargo.lock index b26b4272d0a..eb9a8db7765 100644 --- a/quickwit/Cargo.lock +++ b/quickwit/Cargo.lock @@ -1330,8 +1330,8 @@ dependencies = [ [[package]] name = "chitchat" -version = "0.8.0" -source = "git+https://github.com/quickwit-oss/chitchat.git?rev=d039699#d03969982e1c199aa05cb8e4f86d8d83118057ff" +version = "0.9.0" +source = "git+https://github.com/quickwit-oss/chitchat.git?rev=54cbc70#54cbc70a1986a149ebb5cc301e610e186b752199" dependencies = [ "anyhow", "async-trait", diff --git a/quickwit/Cargo.toml b/quickwit/Cargo.toml index 3bc648caade..ba0963bf938 100644 --- a/quickwit/Cargo.toml +++ b/quickwit/Cargo.toml @@ -89,7 +89,7 @@ base64 = "0.22" bytes = { version = "1", features = ["serde"] } bytesize = { version = "1.3.0", features = ["serde"] } bytestring = "1.3.0" -chitchat = { git = "https://github.com/quickwit-oss/chitchat.git", rev = "d039699" } +chitchat = { git = "https://github.com/quickwit-oss/chitchat.git", rev = "54cbc70" } chrono = { version = "0.4", default-features = false, features = [ "clock", "std", diff --git a/quickwit/quickwit-cluster/src/cluster.rs b/quickwit/quickwit-cluster/src/cluster.rs index 00d42985bda..eb36efff108 100644 --- a/quickwit/quickwit-cluster/src/cluster.rs +++ b/quickwit/quickwit-cluster/src/cluster.rs @@ -779,10 +779,9 @@ mod tests { let self_node_state = cluster_snapshot .chitchat_state_snapshot - .node_state_snapshots + .node_states .into_iter() - .find(|node_state_snapshot| node_state_snapshot.chitchat_id == node.self_chitchat_id) - .map(|node_state_snapshot| node_state_snapshot.node_state) + .find(|node_state| node_state.chitchat_id() == &node.self_chitchat_id) .unwrap(); assert_eq!( self_node_state.get(READINESS_KEY).unwrap(), @@ -800,10 +799,9 @@ mod tests { let self_node_state = cluster_snapshot .chitchat_state_snapshot - .node_state_snapshots + .node_states .into_iter() - .find(|node_state_snapshot| node_state_snapshot.chitchat_id == node.self_chitchat_id) - .map(|node_state_snapshot| node_state_snapshot.node_state) + .find(|node_state| node_state.chitchat_id() == &node.self_chitchat_id) .unwrap(); assert_eq!( self_node_state.get(READINESS_KEY).unwrap(), @@ -821,10 +819,9 @@ mod tests { let self_node_state = cluster_snapshot .chitchat_state_snapshot - .node_state_snapshots + .node_states .into_iter() - .find(|node_state_snapshot| node_state_snapshot.chitchat_id == node.self_chitchat_id) - .map(|node_state_snapshot| node_state_snapshot.node_state) + .find(|node_state| node_state.chitchat_id() == &node.self_chitchat_id) .unwrap(); assert_eq!( self_node_state.get(READINESS_KEY).unwrap(), diff --git a/quickwit/quickwit-serve/src/developer_api/server.rs b/quickwit/quickwit-serve/src/developer_api/server.rs index 301d1c594ff..a06465c7efe 100644 --- a/quickwit/quickwit-serve/src/developer_api/server.rs +++ b/quickwit/quickwit-serve/src/developer_api/server.rs @@ -89,7 +89,7 @@ impl DeveloperService for DeveloperApiServer { "ready_nodes": cluster_snapshot.ready_nodes, "live_nodes": cluster_snapshot.live_nodes, "dead_nodes": cluster_snapshot.dead_nodes, - "chitchat_state": cluster_snapshot.chitchat_state_snapshot.node_state_snapshots, + "chitchat_state": cluster_snapshot.chitchat_state_snapshot.node_states, }) }); if let Some(control_plane_mailbox) = &self.control_plane_mailbox_opt {