Gyu-Ho Lee
255476b5e5
clientv3/retry: clean up retryRPCFunc
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-20 12:30:33 -08:00
Gyu-Ho Lee
805bcc828c
clientv3: simplify V(4) logger with Lvl(4)
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-05 18:48:36 -08:00
Gyu-Ho Lee
c669ff9765
clientv3: retry mutable ops on "no connection available"
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:40:06 -08:00
Gyu-Ho Lee
725df70664
clientv3: only stop if EtcdError code is not Unavailable, retry with more error codes
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-22 17:54:14 -07:00
Gyu-Ho Lee
54ef60d033
clientv3: remove redundant retries in Auth, set FailFast=true
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 16:03:12 -07:00
Gyu-Ho Lee
141170c1d4
clientv3: remove redundant retries in Maintenance, set FailFast=true
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 16:01:50 -07:00
Gyu-Ho Lee
c09a89d834
clientv3: remove redundant retries in Cluster, set FailFast=true
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 16:00:45 -07:00
Gyu-Ho Lee
fecd26f141
clientv3: rename to isRepeatableStopError, isNonRepeatableStopError
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 15:58:12 -07:00
Gyu-Ho Lee
b46ab2c36e
clientv3: remove redundant retries in KV, set FailFast=true
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 15:57:10 -07:00
Gyu-Ho Lee
f95f865060
clientv3: unexport pb.LeaseClient in lease client
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 15:02:19 -07:00
Gyu-Ho Lee
87fe8c12ae
clientv3: rename to repeatableRetry in lease client
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 14:58:54 -07:00
Gyu-Ho Lee
29aa4ce2a1
clientv3: remove redundant retries in Lease, set FailFast=true
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 14:53:01 -07:00
Gyu-Ho Lee
2540859ee7
clientv3: separate readyWait for ConnectNotify
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 13:07:22 -07:00
Gyu-Ho Lee
1549403dd2
clientv3: clean up logging, clarify var/field names
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 12:33:25 -07:00
Gyu-Ho Lee
fbed568b6a
clientv3/balancer: mark partitioned member as unhealthy
...
Previous behavior is when server returns errors, retry
wrapper does not do anything, while passively expecting
balancer to gray-list the isolated endpoint. This is
problematic when multiple endpoints are passed, and
network partition happens.
This patch adds 'endpointError' method to 'balancer' interface
to actively(possibly even before health-check API gets called)
handle RPC errors and gray-list endpoints for the time being,
thus speeding up the endpoint switch.
This is safe in a single-endpoint case, because balancer will
retry no matter what in such case.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-09 13:40:03 -07:00
Gyu-Ho Lee
bed5f388a8
clientv3: add pinned() method to 'balancer'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 15:28:21 -07:00
Gyu-Ho Lee
1c6fbcd3d0
clientv3: add debugging lines to 'retry' paths
...
Helpful for debugging client balancer.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 10:13:25 -07:00
Gyu-Ho Lee
a439095697
clientv3: wait for ConnectNotify before sending RPCs
...
With slow CPU, gRPC can lag behind with RPCs being sent before
calling 'Up', returning 'no address available' on the first try.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-27 13:12:08 -07:00
Anthony Romano
efd7800e0f
clientv3: try next endpoint point on unavailable error
2017-09-16 13:55:39 -07:00
Gyu-Ho Lee
6f76d52a1a
*: deprecate grpc.Code, grpc.ErrorDesc
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 09:28:56 -07:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
4669aaa9a2
clientv3: only retry mutable KV RPCs if no endpoints found
...
Was retrying when it shouldn't, causing multiple puts
2017-08-01 12:55:51 -07:00
Hitoshi Mitake
d431b64d97
etcdserver, clientv3: handle a case of expired auth token
...
This commit adds a mechanism of handling a case of expired auth token
to clientv3. If a server returns an error code
grpc.codes.Unauthenticated, newRetryWrapper() tries to get a new token
and use it as an option of PerRPCCredential.
Fixes https://github.com/coreos/etcd/issues/7012
2017-01-12 11:49:02 +09:00
Xiang Li
81f151eed2
clientv3: fix retry logic
...
1. Balancer should setup gRPC error code correctly for retry.
2. We should not mask context error.
2016-10-22 22:15:43 -07:00
Anthony Romano
267063efd0
clientv3: use grpc codes to translate raw grpc errors
2016-08-26 09:22:09 -07:00
Anthony Romano
3eadf964f4
clientv3: use failfast and retry wrappers for at-most-once rpcs
2016-08-16 10:49:50 -07:00