Loading src/authdb.cpp +13 −2 Original line number Diff line number Diff line Loading @@ -778,9 +778,20 @@ int main(int argc,char *argv[]){ // Cluster backends defer the network fetch to avoid constructor timeouts. // Force an initial fetch now so backend.end() returns the real size. // Retry because peers may still be loading their own data after a // full cluster restart. The ClusterBackend throttles fetches to once // per 10s, so we sleep long enough between retries. if (clusterEnabled) { for (int attempt = 0; attempt < 12; ++attempt) { { AuthBackend::Guard initGuard(backend, AuthBackend::Shared); (void)backend.end(); if (backend.end() > sizeof(authdb::AuthHeader)) break; } if (attempt == 0) std::cerr << "[AUTHDB] waiting for cluster admin data..." << std::endl; std::this_thread::sleep_for(std::chrono::seconds(10)); } } authdb::AuthDB authdb(backend,httpd.getServerSockets()); Loading Loading
src/authdb.cpp +13 −2 Original line number Diff line number Diff line Loading @@ -778,9 +778,20 @@ int main(int argc,char *argv[]){ // Cluster backends defer the network fetch to avoid constructor timeouts. // Force an initial fetch now so backend.end() returns the real size. // Retry because peers may still be loading their own data after a // full cluster restart. The ClusterBackend throttles fetches to once // per 10s, so we sleep long enough between retries. if (clusterEnabled) { for (int attempt = 0; attempt < 12; ++attempt) { { AuthBackend::Guard initGuard(backend, AuthBackend::Shared); (void)backend.end(); if (backend.end() > sizeof(authdb::AuthHeader)) break; } if (attempt == 0) std::cerr << "[AUTHDB] waiting for cluster admin data..." << std::endl; std::this_thread::sleep_for(std::chrono::seconds(10)); } } authdb::AuthDB authdb(backend,httpd.getServerSockets()); Loading