Loading src/cluster.cpp +17 −2 Changes for src/cluster.cpp: 17 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -863,7 +863,15 @@ namespace authdb { int removed = 0; for (uint64_t gid : all_groups) { try { auto data = session_read_client_->retrieve(gid); // Bounded — see Cluster::fetchSessionBySid for why an // unbounded retrieve() here is dangerous: this loop runs // on session_read_client_, the same client normal session // lookups use, and paritypp::client serializes all callers // behind one internal mutex. A single degraded group left // unbounded would stall every session lookup for as long // as this cleanup pass takes. auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5); auto data = session_read_client_->retrieve(gid, deadline); if (data.empty()) continue; uuid::uuid sid, uid, did; std::vector<uuid::uuid> members; Loading Loading @@ -974,7 +982,14 @@ namespace authdb { // Try to retrieve and deserialize each group as a session for (uint64_t gid : all_groups) { try { auto data = session_read_client_->retrieve(gid); // Bounded per group — this runs synchronously in the admin // "list sessions" request thread (see apiListSessions in // admin.cpp). Without a deadline, one degraded group gives // its retrieve() an independent ~30s retry budget (see // Cluster::fetchSessionBySid), which multiplies across every // session in the cluster instead of failing that group closed. auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5); auto data = session_read_client_->retrieve(gid, deadline); if (data.empty()) continue; SessionInfo info; if (SessionBlock::deserialize(data, info.sid, info.uid, info.did, Loading Loading
src/cluster.cpp +17 −2 Changes for src/cluster.cpp: 17 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -863,7 +863,15 @@ namespace authdb { int removed = 0; for (uint64_t gid : all_groups) { try { auto data = session_read_client_->retrieve(gid); // Bounded — see Cluster::fetchSessionBySid for why an // unbounded retrieve() here is dangerous: this loop runs // on session_read_client_, the same client normal session // lookups use, and paritypp::client serializes all callers // behind one internal mutex. A single degraded group left // unbounded would stall every session lookup for as long // as this cleanup pass takes. auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5); auto data = session_read_client_->retrieve(gid, deadline); if (data.empty()) continue; uuid::uuid sid, uid, did; std::vector<uuid::uuid> members; Loading Loading @@ -974,7 +982,14 @@ namespace authdb { // Try to retrieve and deserialize each group as a session for (uint64_t gid : all_groups) { try { auto data = session_read_client_->retrieve(gid); // Bounded per group — this runs synchronously in the admin // "list sessions" request thread (see apiListSessions in // admin.cpp). Without a deadline, one degraded group gives // its retrieve() an independent ~30s retry budget (see // Cluster::fetchSessionBySid), which multiplies across every // session in the cluster instead of failing that group closed. auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5); auto data = session_read_client_->retrieve(gid, deadline); if (data.empty()) continue; SessionInfo info; if (SessionBlock::deserialize(data, info.sid, info.uid, info.did, Loading