From f61ee33be0dde91bc33772fabe3300d98527b29e Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Thu, 7 Feb 2013 12:23:50 -0500 Subject: Avoid hello storms when a bdump fails When a braindump fails, leave the other server's status at SERV_STARTING instead of downgrading to SERV_DEAD, and schedule the next hello to that server at the regular timeout instead of immediately. Otherwise, failed bdumps are retried repeatedly with no delay, keeping the server busy, the logs full, and the network congested. This fixes #89 --- server/bdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/bdump.c b/server/bdump.c index c790d8f..5e7b604 100644 --- a/server/bdump.c +++ b/server/bdump.c @@ -966,9 +966,10 @@ cleanup(Server *server) zdbug((LOG_DEBUG, "bdump cleanup")); if (server != limbo_server) { - server->state = SERV_DEAD; + if (server->state != SERV_STARTING) + server->state = SERV_DEAD; timer_reset(server->timer); - server->timer = timer_set_rel(0L, server_timo, server); + server->timer = timer_set_rel(server->timeout, server_timo, server); } shutdown_file_pointers (); #ifdef _POSIX_VERSION -- cgit v1.2.3