summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-07 12:23:50 -0500
committerGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-14 19:57:31 -0500
commitf61ee33be0dde91bc33772fabe3300d98527b29e (patch)
tree671090ddfc7776470e25544c5002723a0dd68a53
parente2bfb6322ce9f4323b83469dc06dd1ce1b0f4cf6 (diff)
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
-rw-r--r--server/bdump.c5
1 files 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