Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow Up: Stale Metadata #2325 #2327

Merged
merged 1 commit into from
Nov 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl<T: TransportConnect> ClusterStateRefresher<T> {
// todo: implement a more robust failure detector
// This is a naive mechanism for failure detection and is just a stop-gap measure.
// A single connection error or timeout will cause a node to be marked as dead.
trace!("Node {node_id} is marked dead {node_id}: {err}");
trace!("Node {node_id} is marked dead: {err}");
let last_seen_alive = last_state.nodes.get(&node_id.as_plain()).and_then(
|state| match state {
NodeState::Alive(AliveNode {
Expand Down
4 changes: 4 additions & 0 deletions crates/admin/src/cluster_controller/observed_cluster_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ impl ObservedClusterState {
self.update_partitions(cluster_state);
}

/// Update observed cluster state with given [`ClusterState`]
/// Nodes in [`NodeState::Suspect`] state are treated as [`NodeState::Alive`].
/// This means that their `last know` state will not be cleared up yet
/// until they are marked as dead by the [`ClusterState`].
fn update_nodes(&mut self, cluster_state: &ClusterState) {
for (node_id, node_state) in &cluster_state.nodes {
match node_state {
Expand Down
Loading