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
Gyu-Ho Lee
92f5746c54
clientv3/integration: fix license, minor nits in leasing_test.go
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-27 09:23:39 -07:00
Gyu-Ho Lee
090c192517
clientv3: add debugging logs, warnings
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-26 07:16:16 +09:00
Anthony Romano
49e5e78d0f
clientv3/integration: test endpoint switches on partitioned member
2017-09-16 13:55:39 -07:00
Anthony Romano
efd7800e0f
clientv3: try next endpoint point on unavailable error
2017-09-16 13:55:39 -07:00
Anthony Romano
e3deb9f482
clientv3: test health balancer gray listing
2017-09-15 14:24:46 -07:00
Anthony Romano
84db8fdaea
clientv3: health check balancer
2017-09-15 14:24:46 -07:00
Anthony Romano
6f6279075a
Merge pull request #8546 from heyitsanthony/receiver-ci
...
test: check for inconsistent receiver names
2017-09-12 13:59:52 -07:00
Xiang Li
10b731baa8
Merge pull request #8516 from purpleidea/feat/leaseid-okay
...
clientv3: Allow naked LeaseID or int64 for LeaseValue Compare's
2017-09-12 09:05:33 -07:00
Anthony Romano
4fa1dd196c
*: make receiver names consistent
2017-09-12 03:54:04 -07:00
Gyu-Ho Lee
9553afbb24
Merge pull request #8533 from gyuho/grpc
...
*: upgrade grpclog to LoggerV2
2017-09-12 03:53:04 -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
0b2d8a6c96
*: fix minor typos
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 07:33:35 -07:00
Gyu-Ho Lee
d6c33367c4
clientv3: upgrade grpclog to LoggerV2
...
grpclog.Logger has been deprecated.
2017-09-08 15:25:32 -07:00
Gyu-Ho Lee
9a726b424d
*: fix leaky context creation with cancel
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -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
James Shubin
252cab0c13
clientv3: Allow naked LeaseID or int64 for LeaseValue Compare's
...
The logical input to Compare would be a LeaseID (type int64) but the
check panics if we give a LeaseID directly. Allow both so that we don't
unnecessarily annoy and confuse the programmer using the API in the most
logical way.
2017-09-07 13:49:35 -04:00
Anthony Romano
2d0eec0b35
clientv3: goword spelling check
2017-09-06 22:11:33 -07:00
Gyu-Ho Lee
4cbe2e8cae
Merge pull request #8505 from gyuho/conn-timeout
...
clientv3: deprecate grpc.ErrClientConnTimeout errors
2017-09-05 16:50:39 -07:00
James Shubin
550765d037
clientv3: Add LeaseValue helper to Cmp LeaseID values in Txn
2017-09-05 18:51:12 -04:00
Gyu-Ho Lee
15c3c1be28
*: replace 'grpc.ErrClientConnTimeout' with 'context.DeadlineExceeded'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-05 14:10:43 -07:00
Gyu-Ho Lee
312c68a9c6
clientv3: deprecate grpc.ErrClientConnTimeout errors
...
Replace with context.DeadlineExceeded.
Address https://github.com/coreos/etcd/issues/8504 .
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-05 14:10:02 -07:00
Gyu-Ho Lee
e441c57972
clientv3: fix godoc badge link
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-25 17:44:36 -07:00
Anthony Romano
b206afc4a7
concurrency: fix STM example to add to balance
...
Worked by coincidence; the txn would always retry and there
was a 1/10 chance it would pass by selecting the same to/from keys.
2017-08-22 19:39:22 -07:00
Anthony Romano
1d195521c7
concurrency: retry snapshot serializable stm if writes since first header rev
...
Was checking the rset key mod rev, which does not work.
2017-08-22 19:39:22 -07:00
Anthony Romano
5c03ade973
leasing: don't acquire lease on ttl'd keys
...
TTL'd keys may expire on cluster without lease holder's consent.
2017-08-21 12:12:53 -07:00
Anthony Romano
cf0a07be52
integration: test leasing client does not acuire lease on TTL'd keys
2017-08-21 12:11:19 -07:00
Anthony Romano
126e91c449
leasing, integration, etcdmain: closer function for leasing kv
...
Semaphore was seeing goroutine leaks
2017-08-18 14:05:57 -07:00
Gyu-Ho Lee
556c1a1fe0
integration,clientv3/integration: test LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:57 -07:00
Gyu-Ho Lee
15ef98a4ee
clientv3: implement LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Anthony Romano
cf0eb3b7ce
integration: increase timeout for TestLeasingReconnectOwnerRevoke
...
Adding retry to acquire on failure causes Get to now retry until a
connection can be reestablished to the etcd server, causing the
timeout to trigger and fail the test.
2017-08-07 15:51:27 -07:00
Anthony Romano
61ebb98e55
leasing: retry on errors from acquire txn
...
Gets should retry on transient failure, but the txn inserts a write, skipping
the retry logic in the client. Instead, check the error if the txn should be
retried.
Fixes #8372
2017-08-07 11:39:12 -07:00
Gyu-Ho Lee
9982cd0528
clientv3/integration: add 'TestMaintenanceHashKV'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-05 18:17:06 -07:00
Gyu-Ho Lee
8c32cd96fb
clientv3: add 'HashKV' to 'Maintenance' interface
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-05 18:17:06 -07:00
Anthony Romano
d3716b86ae
clientv3: s/ToOpResponse/OpResponse
...
Closer to idiomatic go.
2017-08-04 11:35:36 -07:00
visheshnp
8fe94356f4
clientv3: more Op accessors
2017-08-04 11:35:36 -07:00
Anthony Romano
468078ffcd
integration: leasing tests
2017-08-04 11:35:36 -07:00
visheshnp
a425e98a7e
leasing: KV leasing
2017-08-04 11:35:36 -07:00
Anthony Romano
b7b31e5770
concurrency: add examples
2017-08-02 21:09:05 -07:00
Anthony Romano
d543870966
Merge pull request #8347 from heyitsanthony/use-from-grpc-md
...
clientv3: use FromOutgoingContext to bucket watches
2017-08-01 17:05:56 -07:00
Gyu-Ho Lee
45e6b658dd
Merge pull request #8349 from gyuho/fix-lease-test
...
clientv3/integration: match context canceled on client close
2017-08-01 14:53:31 -07:00
Gyu-Ho Lee
b89ef7e295
clientv3/integration: match context canceled on client close
...
Fix https://github.com/coreos/etcd/issues/8329 .
Different behavior from https://github.com/grpc/grpc-go/pull/1369 ,
in grpc-go transportMonitor.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-01 13:25:13 -07:00
Anthony Romano
7de417d745
clientv3/integration: use grpc metadata to create unique watch ctxs
2017-08-01 13:14:31 -07:00
Anthony Romano
fdba9e5fb1
clientv3/integration: test Put succeeds following SetEndpoint
...
Still gets transport closing errors, but no unavailable endpoint errors.
2017-08-01 12:59:37 -07:00
Anthony Romano
10db0319d1
ordering: use default clients to populate etcd data
...
Switching endpoints on the same client was triggering balancer
reconnect errors that should be tested in clientv3/integration.
2017-08-01 12:56:04 -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
Anthony Romano
8385c6682a
clientv3/integration: test client puts at most once on bad connection
2017-08-01 10:31:13 -07:00
Anthony Romano
1c75c383a1
clientv3: use FromOutgoingContext to bucket watches
...
Watches were bucketed on string(ctx) for historical reasons;
metadata.FromOutgoingContext should be enough to key watches now.
Fixes #8338
2017-08-01 09:26:07 -07:00
Anthony Romano
52b031cfa2
clientv3: accept Compare_LEASE in Compare()
2017-07-31 13:00:04 -07:00
Anthony Romano
fca56f132a
ordering: use x/net/context and add doc.go
...
Compilation troubles when using the "context" package.
2017-07-26 20:58:41 -07:00