497412c588
clientv3: call other APIs with default gRPC call options
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2017-12-20 10:58:05 -08:00
3e58dd707f
clientv3: document lease KeepAlive streaming errors
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2017-12-18 10:19:41 -08:00
da3e3b7240
clientv3: document from "don't halt lease client if there is a lease error"
...
From https://github.com/coreos/etcd/pull/7866 .
2017-12-18 09:55:00 -08:00
a5d9bff24c
clientv3/lease.go: TTL, document expired Lease.
2017-12-18 08:34:19 -05:00
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
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
2d0eec0b35
clientv3: goword spelling check
2017-09-06 22:11:33 -07:00
15ef98a4ee
clientv3: implement LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-08-14 14:18:56 -07:00
5e059fd8dc
*: use metadata Incoming/OutgoingContext
...
Fix https://github.com/coreos/etcd/issues/7888 .
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-06-15 16:41:23 -07:00
4dff7aaa2a
clientv3: change keepAlive Close() to close()
...
keepAlive is a private struct that belongs to clientv3 pkg and shouldn't expose a public Close() method.
2017-06-08 11:53:59 -07:00
aa85b0cea7
clientv3: Do no stop keep alive loop by server side errors
2017-05-08 15:47:34 -07:00
6dd8fb6f24
Revert "Merge pull request #7732 from heyitsanthony/lease-err-ka"
...
This reverts commit fbbc4a4979
, reversing
changes made to f254e38385
.
Fixes #7851
2017-05-02 09:36:16 -07:00
d5f414f69b
clientv3: don't halt lease client if there is a lease error
...
Fixes #7488
2017-04-24 23:49:44 -07:00
8024a0d15f
clientv3: support WithRequireLeader in lease client
...
Unconditionally opens a WithRequireLeader stream in the lease client. Any
keep alive channels opened using WithRequireLeader will be closed when
the leader is lost.
Fixes #7275
2017-03-30 21:39:36 -07:00
3c306cdb3e
clientv3: do not set next keepalive time <= now+TTL
2017-02-21 13:15:45 -08:00
a5cf7fdc87
Merge pull request #7221 from fanminshi/grpcproxy_support_lease_coalescing
...
grpcproxy: support lease coalescing
2017-02-16 13:42:49 -08:00
4fb8d30f0a
clientv3: fix lease keepalive duration
2017-02-16 12:04:07 -08:00
5d3597a5f2
Merge pull request #7338 from xiang90/fix_l
...
clientv3: fix lease keepalive duration
2017-02-16 11:58:10 -08:00
65b59f4423
grpcproxy: incorporate lease proxy into existing proxy framework
2017-02-16 11:50:59 -08:00
4274db46f2
clientv3: fix lease keepalive duration
2017-02-16 11:25:26 -08:00
8cb5e05fc9
clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0
2017-02-14 15:19:29 -08:00
cf5cc18f02
Merge pull request #7286 from heyitsanthony/lease-snip-cancel-stop
...
clientv3: remove cancelWhenStop from lease implementation
2017-02-07 09:12:34 -08:00
a213b3abf5
clientv3: remove cancelWhenStop from lease implementation
...
Only have Close() cancel out outstanding goroutines. Canceling out
single-shot RPCs will mask connection close on client.Close().
2017-02-06 17:21:46 -08:00
a9f10bdeee
clientv3: only start lease stream after first keepalive call
...
Fixes #7274
2017-02-06 11:52:57 -08:00
720234d32b
clientv3: sends keepalive reqs immediately after lease keep alive stream reset
...
when lease client reset lease keep alive stream, sendKeepAliveLoop() should send out keep alive reqs immediately instead of waiting for 500ms.
2017-02-03 16:36:24 -08:00
5e3b20e70c
clientv3: don't reset stream on keepaliveonce or revoke failure
...
Would cause the keepalive loop to cancel out.
Fixes #7082
2017-01-13 09:05:23 -08:00
a375e91c66
clientv3: don't reset keepalive stream on grant failure
...
Was triggering cancelation errors on outstanding KeepAlives if Grant
had to retry.
2016-12-16 10:36:51 -08:00
b126e31132
clientv3: better error message for keep alive loop halt
2016-12-15 16:06:27 +02:00
e0bcd4d516
clientv3: return error from KeepAlive if corresponding loop exits
...
after recvKeepAliveLoop exits client might call KeepAlive adding request channel that will not be closed
this fix makes sure that recvKeepAliveLoop is running before adding request to lessor's list and returns error otherwise
Fixes #6922
2016-12-15 03:02:35 +02:00
9205a242b9
clientv3: do not retry on mutable operations
2016-10-20 10:48:10 -07:00
6a33f0ffd5
clientv3: make balancer respect FastFail
...
The simpleBalancer.Get() blocks grpc.Invoke() even when the Invoke() is called
with the FailFast option. Therefore currently any requests with the
FastFail option actually doesn't fail fast. They get blocked when there is
no endpoints available.
Get() method needs to respect the BlockingWait option when
picks up an endpoint address from the list and fail immediately when the option is
enabled and no endpoint is available.
2016-10-17 14:11:51 -07:00
4c08f6767c
clientv3: add lease.TimeToLive + tests
2016-09-09 08:18:45 +09:00
1aec483e42
clientv3: use correct context in toErr (lease)
2016-09-08 10:58:11 +09:00
3eadf964f4
clientv3: use failfast and retry wrappers for at-most-once rpcs
2016-08-16 10:49:50 -07:00
d8f0ef0e80
clientv3: use grpc.FailFast(false) for all calls
2016-07-14 17:58:58 -07:00
8c96d2573f
*: fixed some warning
2016-06-30 23:13:46 +08:00
6480066054
*: misc typos and go vet fixes
2016-06-22 10:32:13 -07:00
e534532523
clientv3: close keep alive channel if no response within TTL
2016-06-09 09:12:59 -07:00
62f8ec25c0
clientv3: use grpc reconnection logic
2016-06-08 01:04:59 -07:00
fd9e07a529
clientv3: update LICENSE header
2016-05-12 20:50:58 -07:00
22c3a439bc
clientv3: do not stop lease client on lost receive stream
...
Fixes #5242
2016-05-05 19:30:11 -07:00
cdc8f99658
clientv3: rework reconnection logic
...
Avoids go routine flood for tight loops with a dead connection.
Now uses request ctx when reconnecting for immediate retry.
2016-05-05 19:30:11 -07:00
2e3d79a7bf
clientv3: convert errors to rpctypes on returning
...
For https://github.com/coreos/etcd/issues/5211 .
2016-04-28 15:39:37 -07:00
ecb0e2bd38
Merge pull request #5203 from heyitsanthony/fix-lease-leak
...
clientv3: check stream context in lease keep alive send loop
2016-04-26 20:42:31 -07:00
30a9229f38
clientv3: check stream context in lease keep alive send loop
...
If no leases are being kept alive, a connection reset would leak
the send routine since it would only test the stream when sending
keep alives.
Fixes #5200
2016-04-26 20:10:09 -07:00
af1a0b60e2
etcdserver: respond with ttl=0 for revoked lease keep alive
...
Fixes #5172
2016-04-26 13:53:20 -07:00
9ec176a9b0
Merge pull request #5176 from xiang90/lease_client
...
clientv3: keepaliveonce should have a per call ctx
2016-04-25 11:45:58 -07:00
cbd79c666e
clientv3: keepaliveonce should have a per call ctx
...
KeepAliveOnce should have a per call ctx. Now we have a per
API ctx, but we might do rpc calls mutiple times in a for loop.
To avoid unnecessary routine leak, use per call ctx.
2016-04-25 10:46:47 -07:00
844208d7dd
clientv3: retry on switchRemoteAndStream
...
If switchRemoteAndStream fails, the whole lease API fails since
the internal routine exits. We should only fail the whole API when
there is a fatal error. For example, we should fail if we fail to
connection to all the endpoints user provided.
If we connect to an endpoint, but fail to create a stream, we should
retry instead of returning error to fail the entire API.
2016-04-23 21:55:34 -07:00
06a4086bf9
clientv3: Use LeaseID in all the client APIs.
...
In order to use LeaseID type instead of int64 we have to convert
the protobuf lease responses into client lease reponses.
2016-04-14 23:09:46 -07:00