Loading src/cluster.cpp +23 −30 Original line number Diff line number Diff line Loading @@ -447,9 +447,6 @@ namespace authdb { size_t best_online = 0; for (int elapsed = 0; elapsed < timeout_s; ++elapsed) { try { auto &cmtx = getClientMutex(); std::unique_lock<std::timed_mutex> lock(cmtx, std::chrono::seconds(2)); if (lock.owns_lock()) { auto health = pclient_->get_cluster_status(); if (health.nodes_online > best_online) best_online = health.nodes_online; Loading @@ -460,12 +457,9 @@ namespace authdb { // Also check session_client_ health if (session_client_) { try { std::unique_lock<std::timed_mutex> slock(session_client_mutex_, std::chrono::seconds(2)); if (slock.owns_lock()) { auto shealth = session_client_->get_cluster_status(); std::cerr << "Cluster: session_client " << shealth.nodes_online << "/" << shealth.nodes_total << " nodes online" << std::endl; } } catch (...) {} } Loading @@ -478,7 +472,6 @@ namespace authdb { << "/" << n << " nodes online, continuing" << std::endl; return health.nodes_online; } } } catch (const std::exception &e) { std::cerr << "Cluster: peer probe failed: " << e.what() << std::endl; } Loading src/cluster.h +0 −3 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ namespace authdb { // Accessors for backend use paritypp::block_store &getStore() { return *store_; } std::unique_ptr<paritypp::client> &getClient() { return pclient_; } std::timed_mutex &getClientMutex() { return client_mutex_; } // Push a session to the cluster (after local addSession) void pushSession(const SessionData &sess); Loading Loading @@ -251,11 +250,9 @@ namespace authdb { std::unique_ptr<paritypp::server> server_; std::unique_ptr<paritypp::client> pclient_; std::timed_mutex client_mutex_; // Dedicated client for session ops — avoids contention with domain data fetches std::unique_ptr<paritypp::client> session_client_; std::timed_mutex session_client_mutex_; void server_loop(); void health_monitor_loop(); Loading Loading
src/cluster.cpp +23 −30 Original line number Diff line number Diff line Loading @@ -447,9 +447,6 @@ namespace authdb { size_t best_online = 0; for (int elapsed = 0; elapsed < timeout_s; ++elapsed) { try { auto &cmtx = getClientMutex(); std::unique_lock<std::timed_mutex> lock(cmtx, std::chrono::seconds(2)); if (lock.owns_lock()) { auto health = pclient_->get_cluster_status(); if (health.nodes_online > best_online) best_online = health.nodes_online; Loading @@ -460,12 +457,9 @@ namespace authdb { // Also check session_client_ health if (session_client_) { try { std::unique_lock<std::timed_mutex> slock(session_client_mutex_, std::chrono::seconds(2)); if (slock.owns_lock()) { auto shealth = session_client_->get_cluster_status(); std::cerr << "Cluster: session_client " << shealth.nodes_online << "/" << shealth.nodes_total << " nodes online" << std::endl; } } catch (...) {} } Loading @@ -478,7 +472,6 @@ namespace authdb { << "/" << n << " nodes online, continuing" << std::endl; return health.nodes_online; } } } catch (const std::exception &e) { std::cerr << "Cluster: peer probe failed: " << e.what() << std::endl; } Loading
src/cluster.h +0 −3 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ namespace authdb { // Accessors for backend use paritypp::block_store &getStore() { return *store_; } std::unique_ptr<paritypp::client> &getClient() { return pclient_; } std::timed_mutex &getClientMutex() { return client_mutex_; } // Push a session to the cluster (after local addSession) void pushSession(const SessionData &sess); Loading Loading @@ -251,11 +250,9 @@ namespace authdb { std::unique_ptr<paritypp::server> server_; std::unique_ptr<paritypp::client> pclient_; std::timed_mutex client_mutex_; // Dedicated client for session ops — avoids contention with domain data fetches std::unique_ptr<paritypp::client> session_client_; std::timed_mutex session_client_mutex_; void server_loop(); void health_monitor_loop(); Loading