Loading src/cluster.cpp +4 −8 Changes for src/cluster.cpp: 4 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -515,14 +515,10 @@ namespace authdb { first_run = false; if (!running_ || !pclient_) continue; try { std::unique_lock<std::timed_mutex> lock; if (critical_ || degraded_) { // When degraded/critical, briefly wait to ensure probes can execute lock = std::unique_lock<std::timed_mutex>(client_mutex_, std::chrono::seconds(2)); } else { // Normal: non-blocking, don't fight session ops lock = std::unique_lock<std::timed_mutex>(client_mutex_, std::try_to_lock); } // Always use try_to_lock — health probes must never starve // session pushes/fetches. If we can't get the lock, skip // this cycle; the next one (3s or 10s later) will retry. std::unique_lock<std::timed_mutex> lock(client_mutex_, std::try_to_lock); if (!lock.owns_lock()) continue; auto health = pclient_->get_cluster_status(); bool was_degraded = degraded_; Loading Loading
src/cluster.cpp +4 −8 Changes for src/cluster.cpp: 4 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -515,14 +515,10 @@ namespace authdb { first_run = false; if (!running_ || !pclient_) continue; try { std::unique_lock<std::timed_mutex> lock; if (critical_ || degraded_) { // When degraded/critical, briefly wait to ensure probes can execute lock = std::unique_lock<std::timed_mutex>(client_mutex_, std::chrono::seconds(2)); } else { // Normal: non-blocking, don't fight session ops lock = std::unique_lock<std::timed_mutex>(client_mutex_, std::try_to_lock); } // Always use try_to_lock — health probes must never starve // session pushes/fetches. If we can't get the lock, skip // this cycle; the next one (3s or 10s later) will retry. std::unique_lock<std::timed_mutex> lock(client_mutex_, std::try_to_lock); if (!lock.owns_lock()) continue; auto health = pclient_->get_cluster_status(); bool was_degraded = degraded_; Loading