Loading src/backends/cluster.cpp +3 −4 Changes for src/backends/cluster.cpp: 3 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -101,10 +101,9 @@ namespace authdb { if (client) { try { auto &cmtx = g_Cluster->getClientMutex(); // Use try_to_lock: this runs under the exclusive backend // lock, so any blocking here starves shared readers and // causes "backend shared lock timeout" on other threads. std::unique_lock<std::timed_mutex> lock(cmtx, std::try_to_lock); // Brief wait (200ms) to let short operations finish, but // not long enough to starve shared readers (5s timeout). std::unique_lock<std::timed_mutex> lock(cmtx, std::chrono::milliseconds(200)); if (lock.owns_lock()) { peer_data = client->retrieve(dgid); _LastPeerFetch = now; Loading Loading
src/backends/cluster.cpp +3 −4 Changes for src/backends/cluster.cpp: 3 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -101,10 +101,9 @@ namespace authdb { if (client) { try { auto &cmtx = g_Cluster->getClientMutex(); // Use try_to_lock: this runs under the exclusive backend // lock, so any blocking here starves shared readers and // causes "backend shared lock timeout" on other threads. std::unique_lock<std::timed_mutex> lock(cmtx, std::try_to_lock); // Brief wait (200ms) to let short operations finish, but // not long enough to starve shared readers (5s timeout). std::unique_lock<std::timed_mutex> lock(cmtx, std::chrono::milliseconds(200)); if (lock.owns_lock()) { peer_data = client->retrieve(dgid); _LastPeerFetch = now; Loading