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
e3fd246414
clientv3: fix KeepAliveOnce return error message
2016-04-11 08:13:36 +08:00
953a08d841
*: clean up from gosimple
2016-04-08 11:55:03 -07:00
dc17eaace7
*: rename Lease Create to Grant
...
Creating a lease through the client API interface union looked like
"c.Create(...)"-- the method name wasn't very descriptive.
2016-04-07 12:28:14 -07:00
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
a001651bc1
clientv3: remove dependency on lease package
2016-03-17 11:52:34 -07:00
16c35167df
clientv3: do not reconnect on request context cancellation
2016-03-03 13:43:16 -08:00
993fd76b19
clientv3: respect first stream error in lease recv loop
...
Fixes #4622
2016-02-25 16:59:08 -08:00
afa0368dcc
*: fix godoc bugs in interfaces and slice fields
...
detected with goword
2016-02-24 00:45:40 -08:00
50ad181477
clientv3: support context cancellation on lease keep alives
2016-02-20 23:21:15 -08:00
fd0e68d16b
clientv3/integration: test lease keepalive
2016-02-02 10:59:22 -08:00
eb8ab3ace4
clientv3: synchronous lease Close
2016-02-01 22:24:42 -08:00
f7692cf5d2
clientv3: fix shadowed variables in lease
2016-02-01 15:08:24 -08:00