357 Commits

Author SHA1 Message Date
Anthony Romano
5b50658118 clientv3: simplify watch synchronization
Was more complicated than it needed to be and didn't really work in the
first place. Restructured watcher registation to use a queue.
2016-10-03 16:56:14 -07:00
Anthony Romano
9ce398f8a6 integration: test canceling watchers when disconnected 2016-10-03 16:56:14 -07:00
Gyu-Ho Lee
29dd3cf5bd Revert "clientv3/integration: add TestDialWithHTTPS"
This reverts commit a96a28d6030807ffe0f0cd6c708581cdaebdbb87.
2016-10-03 13:05:08 -07:00
Gyu-Ho Lee
a96a28d603 clientv3/integration: add TestDialWithHTTPS 2016-10-03 02:16:07 -07:00
Gyu-Ho Lee
f45542394b clientv3: handle 'https' scheme in endpoint 2016-10-03 01:03:28 -07:00
Anthony Romano
bf2581390d clientv3: make IsProgressNotify() false on compact event and closed channel
Fixes #6549
2016-09-28 16:49:39 -07:00
Anthony Romano
27c500d8d0 Merge pull request #6487 from heyitsanthony/watch-stress
clientv3: process closed watcherStreams in watcherGrpcStream run loop
2016-09-21 13:55:25 -07:00
Anthony Romano
a32518006c clientv3: process closed watcherStreams in watcherGrpcStream run loop
Was racing with Watch() when closing the grpc stream on no watchers.

Fixes #6476
2016-09-21 13:28:00 -07:00
Anthony Romano
deef16b376 integration: test client watchers with overlapped context cancels 2016-09-21 09:40:24 -07:00
Gyu-Ho Lee
cdb1e34799 clientv3: add 'Sync' method 2016-09-21 09:10:25 -07:00
Anthony Romano
69c7ea0b4a Merge pull request #6473 from heyitsanthony/watchreconn-putretry
integration: l-read before Put in TestWatchReconnRequest
2016-09-19 14:52:26 -07:00
Anthony Romano
0fb2cab221 integration: l-read before Put in TestWatchReconnRequest
TestWatchReconnRequest occasionally triggers elections because it spins on
drop connections, eating up CPU. In case there's an election, submit an
l-read to wait for the cluster to settle down.

Fixes #6314
2016-09-19 14:14:32 -07:00
Gyu-Ho Lee
f11b35eb71 clientv3/integration: test 'SetEndpoints' 2016-09-20 04:36:14 +09:00
Gyu-Ho Lee
b9d18d4ac9 clientv3: add 'SetEndpoints' method 2016-09-20 04:36:01 +09:00
Anthony Romano
e77baa3dcb Merge pull request #6424 from heyitsanthony/v3api-createminmax
etcdserver: range queries with min/max create revision
2016-09-14 19:10:52 -07:00
Xiang Li
059f419ac5 Merge pull request #6429 from xiang90/fix_balancer
clientv3: balancer panics when call up after close
2016-09-14 19:42:24 -05:00
Anthony Romano
9b1fe45853 concurrency: use create max revision for locks and elections 2016-09-14 17:03:33 -07:00
Xiang Li
004a5f0dbc clientv3: balancer panics when call up after close
Fix the issue by adding a simple guard varable.
2016-09-15 07:43:42 +08:00
Anthony Romano
5bd251a6fa clientv3: WithMinCreateRev, WithMaxCreateRev 2016-09-14 15:31:45 -07:00
Hitoshi Mitake
4211c0b7af etcdctl, clientv3: improve printing of role get for prefix permission
This commit improves printing of role get command for prefix
permission. If a range permission corresponds to a prefix permission,
it is explicitly printed for a user. Below is an example of the new
printing:

$ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1
Role r1
KV Read:
        [/dir/, /dir0) (prefix /dir/)
        [k1, k5)
KV Write:
        [/dir/, /dir0) (prefix /dir/)
        [k1, k5)
2016-09-14 16:10:32 +09:00
Xiang Li
e6a7f25065 Merge pull request #6411 from heyitsanthony/v3api-minmaxmod
etcdserver: Range with min/max mod revision
2016-09-13 05:54:58 -05:00
Xiang Li
56084a7cc8 clientv3: return error from response when possible 2016-09-13 11:18:21 +08:00
Anthony Romano
b0481ba858 clientv3: WithMinModRev and WithMaxModRev 2016-09-12 19:44:14 -07:00
Gyu-Ho Lee
03b9d6f24c *: separate 'capnslog' log level setting 2016-09-10 20:26:51 +09:00
Gyu-Ho Lee
4c08f6767c clientv3: add lease.TimeToLive + tests 2016-09-09 08:18:45 +09:00
Gyu-Ho Lee
1aec483e42 clientv3: use correct context in toErr (lease) 2016-09-08 10:58:11 +09:00
Anthony Romano
ad318ee891 clientv3: drain buffered WatchResponses before resuming
Otherwise, the watcherStream can receive WatchResponses in the
middle of a resume, corrupting the stream.

Fixes #6364
2016-09-06 17:15:39 -07:00
Hitoshi Mitake
bc5d7bbe03 auth, e2e, clientv3: the root role should be granted access to every key
This commit changes the semantics of the root role. The role should be
able to access to every key.

Partially fixes https://github.com/coreos/etcd/issues/6355
2016-09-06 16:10:28 +09:00
Anthony Romano
7b2f769643 clientv3: only resume watcher if error is non-halting 2016-09-01 15:22:35 -07:00
Jason E. Aten
9497e9678c clientv3/concurrency: allow election on prefixes of keys.
After winning an election or obtaining a lock, we
auto-append a slash after the provided key prefix.
This avoids the previous deadlock due to waiting
on the wrong key.

Fixes #6278
2016-08-29 18:34:14 -07:00
Anthony Romano
5e963608b7 clientv3: do not treat Internal codes as halting
Fixes #6277
2016-08-28 20:20:22 -07:00
Anthony Romano
3552420dfd clientv3: set failfast=false on read-only txns 2016-08-28 19:40:38 -07:00
Anthony Romano
a50c707050 clientv3/integration: wait for two request timeouts in txn tests
Read only txns and Get may timeout once if the leader is lost.
2016-08-26 10:04:10 -07:00
Anthony Romano
267063efd0 clientv3: use grpc codes to translate raw grpc errors 2016-08-26 09:22:09 -07:00
Xiang Li
f2b7c501cc clientv3/integration: fix TestKVPutStoppedServerAndClose 2016-08-24 13:57:27 -07:00
Gyu-Ho Lee
be38c50567 clientv3: specify watch progress notify interval
For watch request
2016-08-22 15:44:59 -07:00
Anthony Romano
8d7703528a Merge pull request #5845 from heyitsanthony/clientv3-ignore-dead-eps
clientv3: respect up/down notifications from grpc
2016-08-16 11:56:03 -07:00
Anthony Romano
3eadf964f4 clientv3: use failfast and retry wrappers for at-most-once rpcs 2016-08-16 10:49:50 -07:00
Anthony Romano
46765ad79c clientv3: respect up/down notifications from grpc
Fixes #5842
2016-08-16 09:49:36 -07:00
Xiang Li
feaff17259 session: remove session manager and add ttl 2016-08-15 14:12:25 -07:00
Anthony Romano
429d5ab20b clientv3: only block on New() when DialTimeout > 0
Fixes #6162
2016-08-12 10:33:11 -07:00
Gyu-Ho Lee
1644679d00 clientv3: add 'ExampleConfig_withTLS' 2016-08-10 14:37:34 -07:00
Anthony Romano
1c83a46c6d clientv3: handle watchGrpcStream shutdown if prior to goroutine start
Fixes #6141
2016-08-09 19:59:04 -07:00
Anthony Romano
8c1c291332 clientv3/integration: test watcher cancelation propagation to server 2016-08-09 00:10:57 -07:00
Anthony Romano
5e651a0d0d clientv3: close watcher stream once all watchers detach
Fixes #6134
2016-08-09 00:10:57 -07:00
Gyu-Ho Lee
ddddecc3ab clientv3: ignore sort-ascend-key option 2016-08-04 11:13:41 -07:00
Xiang Li
57c68ab1db grpcproxy: handle create event 2016-08-02 20:51:30 -07:00
Xiang Li
33c3583b50 clientv3: add send created notification 2016-08-02 20:08:11 -07:00
Anthony Romano
4c9a2a65c9 integration: test clientv3 watch filters 2016-07-27 21:25:06 -07:00
Anthony Romano
943fe70178 clientv3: support watch filters 2016-07-27 21:24:52 -07:00