open-consul/lib
James Phillips d1ad538345 Makes RPC handling more robust when rolling servers. (#3561)
* Adds client-side retry for no leader errors.

This paves over the case where the client was connected to the leader
when it loses leadership.

* Adds a configurable server RPC drain time and a fail-fast path for RPCs.

When a server leaves it gets removed from the Raft configuration, so it will
never know who the new leader server ends up being. Without this we'd be
doomed to wait out the RPC hold timeout and then fail. This makes things fail
a little quicker while a sever is draining, and since we added a client retry
AND since the server doing this has already shut down and left the Serf LAN,
clients should retry against some other server.

* Makes the RPC hold timeout configurable.

* Reorders struct members.

* Sets the RPC hold timeout default for test servers.

* Bumps the leave drain time up to 5 seconds.

* Robustifies retries with a simpler client-side RPC hold.

* Reverts untended delete.
2017-10-10 15:19:50 -07:00
..
cluster.go golint: Fix existing comments 2017-04-25 09:26:13 -07:00
cluster_test.go Guard against divide by zero in lib.RandomStagger() 2016-04-23 13:11:32 -07:00
eof.go Makes RPC handling more robust when rolling servers. (#3561) 2017-10-10 15:19:50 -07:00
math.go Add lib.AbsInt() helper function 2016-03-30 11:47:37 -07:00
math_test.go Add lib.AbsInt() helper function 2016-03-30 11:47:37 -07:00
path.go Adds basic support for node IDs. 2017-01-17 22:47:59 -08:00
rand.go Use a cryptographically secure seed 2016-05-02 23:52:37 -07:00
rtt.go Adds open source side of network segments (feature is Enterprise-only). 2017-08-30 11:58:29 -07:00
rtt_test.go Adds open source side of network segments (feature is Enterprise-only). 2017-08-30 11:58:29 -07:00
string.go Cull unused function and its unit test. 2016-02-01 22:40:19 -08:00
string_test.go Cull unused function and its unit test. 2016-02-01 22:26:57 -08:00