Skip to content

Commit

Permalink
director: Don't reset directors' last_network_failure while handshaking
Browse files Browse the repository at this point in the history
The reset is done mainly to make it faster for a director that has been down
to connect back to the ring, without other directors still thinking that
it's down. But DIRECTOR that is sent during handshake says nothing about
whether the director is up at the moment or not.
  • Loading branch information
sirainen committed Sep 15, 2017
1 parent e2fdcdb commit e588e0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/director/director-connection.c
Expand Up @@ -761,8 +761,12 @@ static bool director_cmd_director(struct director_connection *conn,
}

/* already have this. just reset its last_network_failure
timestamp, since it might be up now. */
host->last_network_failure = 0;
timestamp, since it might be up now, but only if this
isn't part of the handshake. (if it was, reseting the
timestamp could cause us to rapidly keep trying to connect
to it) */
if (conn->handshake_received)
host->last_network_failure = 0;
/* it also may have been restarted, reset its state */
director_host_restarted(host);
} else {
Expand Down

0 comments on commit e588e0b

Please sign in to comment.