Commit 4d3116f6 authored by jan.koester's avatar jan.koester
Browse files

test

parent a8c3475e
Loading
Loading
Loading
Loading
Loading
+2 −7
Changes for src/cluster.cpp: 2 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -530,20 +530,15 @@ namespace authdb {

                // Propagate dead node info to session_client_
                if (session_client_) {
                    for (auto &[idx, st] : health.node_statuses) {
                        // node_statuses only contains reachable nodes
                    }
                    // Mark unreachable nodes as dead in session_client_
                    std::set<size_t> online_nodes;
                    for (auto &[idx, st] : health.node_statuses)
                        online_nodes.insert(idx);
                    for (const auto &ns : health.node_statuses)
                        online_nodes.insert(ns.first);
                    for (size_t i = 0; i < n; ++i) {
                        if (online_nodes.find(i) == online_nodes.end())
                            session_client_->mark_node_dead(i);
                    }
                }

                bool was_degraded = degraded_;
                bool was_critical = critical_;
                if (health.nodes_online >= n) {
                    if (degraded_) {