Loading src/authdb.cpp +4 −14 Original line number Diff line number Diff line Loading @@ -777,21 +777,11 @@ 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. // Trigger a single initial fetch so backend.end() reflects cluster state. if (clusterEnabled) { for (int attempt = 0; attempt < 12; ++attempt) { { authdb::AuthBackend::Guard initGuard(backend, authdb::AuthBackend::Shared); 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)); } std::cerr << "[AUTHDB] initial cluster fetch: admin.local size=" << backend.end() << std::endl; } authdb::AuthDB authdb(backend,httpd.getServerSockets()); Loading Loading
src/authdb.cpp +4 −14 Original line number Diff line number Diff line Loading @@ -777,21 +777,11 @@ 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. // Trigger a single initial fetch so backend.end() reflects cluster state. if (clusterEnabled) { for (int attempt = 0; attempt < 12; ++attempt) { { authdb::AuthBackend::Guard initGuard(backend, authdb::AuthBackend::Shared); 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)); } std::cerr << "[AUTHDB] initial cluster fetch: admin.local size=" << backend.end() << std::endl; } authdb::AuthDB authdb(backend,httpd.getServerSockets()); Loading