Anthony Romano
1d88130522
clientv3: fix deadlock on Get with concurrent Close
2016-06-01 05:53:21 -07:00
Anthony Romano
51551abef5
concurrency, benchmark: read-committed STM isolation policy
2016-05-31 14:35:27 -07:00
Gyu-Ho Lee
7b5657cf1a
clientv3: check if KV.Client is closed
...
For https://github.com/coreos/etcd/issues/5495 .
2016-05-31 12:00:19 -07:00
Gyu-Ho Lee
d116c116fe
clientv3: getRemote comment about release
2016-05-31 12:00:19 -07:00
Gyu-Ho Lee
9a0fe2620e
clientv3: fix panic message in OpPut
2016-05-28 11:55:28 -07:00
Anthony Romano
9dc0782f45
clientv3: handle URL scheme when given in endpoint
...
Fixes #5427
2016-05-25 18:01:36 -06:00
James Shubin
374b3ee40b
clientv3: fix typo
2016-05-20 17:18:52 -04:00
James Shubin
edca3cbe44
clientv3: Fix typos
...
Found randomly when going through docs. HTH
2016-05-20 14:06:29 -04:00
Gyu-Ho Lee
fa1e40c120
clientv3/concurrency: preallocate slice in stm
2016-05-19 14:42:19 -07:00
Gyu-Ho Lee
f9306fb817
clientv3: preallocate watch streams slice
...
To avoid slice growth when appending
2016-05-19 12:55:55 -07:00
Anthony Romano
e4a2dcad9e
clientv3/integration: ignore closing transport in TestKVPutStoppedServerAndClose
...
The grpc "transport is closing" error is rasied when the host is unreachable;
there's no good way to avoid it for a Put.
Fixes #5343
2016-05-18 14:49:39 -07:00
Anthony Romano
782a8802c0
clientv3: avoid reusing closed connection in KV
2016-05-18 14:46:17 -07:00
Gyu-Ho Lee
86c85b88ad
Merge pull request #5377 from purpleidea/bug/typos
...
clientv3: fix typos
2016-05-17 12:51:13 -07:00
James Shubin
42f3b4964f
clientv3: fix typos
2016-05-17 15:39:56 -04:00
Hitoshi Mitake
6259318521
*: attach auth token as a gRPC credential
...
This commit adds a functionality of attaching an auth token to gRPC
connection as a per RPC credential.
For doing this, this commit lets clientv3.Client.Dial() create a
dedicated gRPC connection for doing authentication. With the dedicated
connection, the client calls Authenticate() RPC and obtain its
token. The token is attached to the main gRPC connection with
grpc.WithPerRPCCredentials().
This commit also adds a new option --username to etcdctl (v3). With
this option, etcdctl attaches its auth token to the main gRPC
connection (currently it is not used at all).
2016-05-17 13:26:12 +09:00
Anthony Romano
e8101ddf09
clientv3: throttle reconnection rate
...
Client was reconnecting after establishing connections because the lease
and watch APIs were thrashing. Instead, wait a little before accepting
new reconnect requests.
2016-05-16 11:14:45 -07:00
Xiang Li
ec2ac72585
proxy: initial grpc kv service proxy
2016-05-13 23:00:29 -07:00
Xiang Li
c7c0e1eb7a
integration: remove parallel testing
...
We cannot do testing in parallel since leak testing will detect the goroutines
in other tests running in parallel.
2016-05-13 12:01:25 -07:00
Anthony Romano
120020fa9c
clientv3/concurrency: use session id for election keys to avoid deadlock
2016-05-13 10:07:35 -07:00
Anthony Romano
393725fe5f
clientv3/concurrency: ctx-ize Leader(), Resign(), and Unlock()
2016-05-13 10:07:35 -07:00
Gyu-Ho Lee
fd9e07a529
clientv3: update LICENSE header
2016-05-12 20:50:58 -07:00
Gyu-Ho Lee
68eaf4083a
clientv3: WithRequireLeader
2016-05-12 19:25:42 -07:00
Anthony Romano
527aa1a499
clientv3: fix Close after failed Put
...
Was crashing on a nil connection. Reworked the shutdown path a little so
there's only one connection close site.
2016-05-12 16:16:27 -07:00
Xiang Li
0d43a2b7e7
Merge pull request #5295 from ajityagaty/auth_disable
...
auth: Adding support for "auth disable" command.
2016-05-07 23:09:37 -07:00
Ajit Yagaty
adc981c53d
auth: Adding support for "auth disable" command.
...
Added support for the auth disable command in the server, added the
etcdctl command and a respective testcase.
2016-05-07 19:21:49 -07:00
Anthony Romano
712090fc09
clientv3: keep watcher client active if reconnect has network error
...
Otherwise watchers created after a long disconnect period will always
close immediately.
2016-05-05 19:30:11 -07:00
Anthony Romano
22c3a439bc
clientv3: do not stop lease client on lost receive stream
...
Fixes #5242
2016-05-05 19:30:11 -07:00
Anthony Romano
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
Anthony Romano
8b52fd0d2d
clientv3: gracefully handle watcher resume on compacted revision
...
Fixes #5239
2016-05-03 09:30:53 -07:00
Gyu-Ho Lee
0c5bcd5d80
clientv3: fix README, add error handling example
2016-04-29 13:34:16 -07:00
Gyu-Ho Lee
b3ebe66c97
clientv3/integration: tests with new errors
2016-04-29 12:00:26 -07:00
Gyu-Ho Lee
6049c95dc9
clientv3: auth with rpctypes.Error
2016-04-29 12:00:26 -07:00
Anthony Romano
c26eb3f241
clientv3: better serialization for kv and txn connection retry
...
If the grpc connection is restored between an rpc network failure
and trying to reestablish the connection, the connection retry would
end up resetting good connections if many operations were
in-flight at the time of network failure.
2016-04-29 09:26:32 -07:00
Gyu-Ho Lee
f148f4b2b9
clientv3/integration: tests error types (rpctypes)
2016-04-28 15:42:27 -07:00
Gyu-Ho Lee
2e3d79a7bf
clientv3: convert errors to rpctypes on returning
...
For https://github.com/coreos/etcd/issues/5211 .
2016-04-28 15:39:37 -07:00
Anthony Romano
08f6c0775a
Merge pull request #5199 from heyitsanthony/safe-lock-retry
...
clientv3/concurrency: use session lease id for mutex keys
2016-04-27 11:10:46 -07:00
Anthony Romano
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
Anthony Romano
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
Anthony Romano
22797c7185
clientv3/concurrency: use session lease id for mutex keys
...
With randomized keys, if the connection goes down, but the session remains,
the client would need complicated recovery logic to avoid deadlock.
Instead, bind the session's lease id to the lock entry; if a session tries
to reacquire the lock it will reassume its old place in the wait list.
2016-04-26 17:37:26 -07:00
Anthony Romano
af1a0b60e2
etcdserver: respond with ttl=0 for revoked lease keep alive
...
Fixes #5172
2016-04-26 13:53:20 -07:00
Anthony Romano
b7ac758969
*: rename storage package to mvcc
2016-04-25 15:25:51 -07:00
Xiang Li
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
Xiang Li
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
Xiang Li
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
Hitoshi Mitake
131e3806bb
*: support authenticate in v3 auth
...
This commit implements Authenticate() API of the auth package. It does
authentication based on its authUsers bucket and generate a token for
succeeding RPCs.
2016-04-21 12:32:19 +09:00
Ajit Yagaty
da5bd04a1a
clientv3: Remove superflous LeaseID casts in integration tests.
...
The integration tests under clientv3 have superflous LeaseID casts
that are not needed as the ID field of the lease responses are of
type LeaseID now.
2016-04-15 17:48:20 -07:00
Anthony Romano
9bfa0172f5
test, clientv3: run examples as integration tests
2016-04-15 11:51:30 -07:00
Anthony Romano
c1455a4f10
Merge pull request #5090 from ajityagaty/lease_id
...
clientv3: Use LeaseID in all the client APIs.
2016-04-15 10:48:29 -07:00
Gyu-Ho Lee
ae27b991b1
*: add more examples to clientv3, pkg/adt
2016-04-14 23:46:50 -07:00
Ajit Yagaty
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
Anthony Romano
57448622d9
Merge pull request #5085 from heyitsanthony/hide-yaml
...
clientv3: make YamlConfig struct private
2016-04-14 14:10:20 -07:00
Anthony Romano
04ef861c3d
clientv3: make YamlConfig struct private
2016-04-14 12:26:01 -07:00
Gyu-Ho Lee
81e344bef9
clientv3: fix example code format, more examples
2016-04-14 12:13:07 -07:00
Gyu-Ho Lee
2c6176b5f2
*: remove MemberLeader API in client side (fix examples)
2016-04-13 16:23:57 -07:00
Xiang Li
ae9b251d99
etcdctl: move endpoint-heath and status into endpoint command
2016-04-12 16:30:26 -07:00
Anthony Romano
be822b05d2
Merge pull request #5012 from heyitsanthony/snap-api
...
*: snapshot RPC
2016-04-11 13:00:18 -07:00
Xiang Li
174a996c37
Merge pull request #5032 from mitake/auth-user-grant
...
*: support granting a role to a user in v3 auth
2016-04-11 11:10:10 -07:00
Anthony Romano
d5766eab3e
clientv3: add Snapshot to Maintenance
2016-04-11 09:51:17 -07:00
Hitoshi Mitake
7ba2646d37
*: support granting a role to a user in v3 auth
2016-04-11 15:53:30 +09:00
Gyu-Ho Lee
9108af9046
*: clean up from go vet, misspell
2016-04-10 23:16:56 -07:00
Gyu-Ho Lee
1f4f3667a4
Merge pull request #5021 from gyuho/vendor_doc
...
*: client vendoring README
2016-04-10 22:15:36 -07:00
Hitoshi Mitake
02033b4c47
*: support granting key permission to role in v3 auth
2016-04-11 12:23:19 +09:00
lolynx
e3fd246414
clientv3: fix KeepAliveOnce return error message
2016-04-11 08:13:36 +08:00
Gyu-Ho Lee
78554c6de6
*: client vendoring README
2016-04-08 19:48:17 -07:00
Gyu-Ho Lee
953a08d841
*: clean up from gosimple
2016-04-08 11:55:03 -07:00
Gyu-Ho Lee
fb85da92e8
*: fix based on gosimple and unused
2016-04-07 23:16:37 -07:00
Gyu-Ho Lee
a9f1d5dfa6
clientv3/integration: use clientv3 event types
...
Fix https://github.com/coreos/etcd/issues/5001 .
2016-04-07 19:29:32 -07:00
Anthony Romano
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
Hongchao Deng
aa11dafaf8
clientv3: expose event type in user API
...
- add another layer of abstraction in clientv3 for user, not expose internal storagepb ones
- provide commonly used routines IsCreate(), IsModify() on event
2016-04-07 09:47:04 -07:00
Gyu-Ho Lee
e72591b4a2
clientv3/integration: fix watch range test typo
2016-04-06 21:12:07 -07:00
Xiang Li
c3bca3739f
Merge pull request #4926 from mitake/auth-role-add
...
*: support adding role in auth v3
2016-04-04 18:44:16 -07:00
Hitoshi Mitake
2b17a3919c
*: support adding role in auth v3
2016-04-05 09:28:17 +09:00
Hitoshi Mitake
88306c9fa7
etcdserver, clientv3: let progressReportIntervalMilliseconds be private
...
progressReportIntervalMilliseconds (old
ProgressReportIntervalMilliseconds) is accessed by multiple goroutines
and it is reported as race.
For avoiding this report, this commit wraps the variable with
functions. They access the variable with atomic operations so the race
won't be reported.
2016-04-05 09:12:17 +09:00
Xiang Li
19136afc2b
Merge pull request #4798 from mqliang/memberStatus
...
etcdctlv3: initial implementaton of 'etcdctl member status' command
2016-04-03 08:48:23 -07:00
mqliang
f3ca17ea03
etcdctlv3: implement the client side functionality
2016-04-03 13:46:34 +08:00
Gyu-Ho Lee
b0cc0e443c
*: clean up if, bool comparison
2016-04-02 12:55:11 -07:00
Xiang Li
802de5f9f8
clientv3: support read conf from file
2016-04-01 09:36:11 -07:00
Hitoshi Mitake
73166b41e9
*: support changing password in v3 auth
...
This commit adds a functionality for updating password of existing
users.
2016-03-31 15:28:15 +09:00
Hitoshi Mitake
d8888ded12
*: support deleting user in v3 auth
...
This commit adds a functionality of user deletion. It can be invoked
with the new user delete command.
Example usage:
$ ETCDCTL_API=3 etcdctl user delete usr1
2016-03-31 13:18:51 +09:00
Anthony Romano
7ce5c2b9ff
Merge pull request #4902 from heyitsanthony/alarm-ctl
...
etcdctl: alarm command
2016-03-30 13:55:29 -07:00
Anthony Romano
c91b2d098d
clientv3: AlarmList and AlarmDisarm
2016-03-30 13:33:52 -07:00
Gyu-Ho Lee
b8d3b15206
*: document client package vendoring guide
2016-03-30 09:34:41 -07:00
Xiang Li
b0956d5dbf
Merge pull request #4891 from mitake/auth-prefix
...
*: add Auth prefix to auth related requests and responses
2016-03-29 17:24:12 -07:00
Xiang Li
9d49d35090
client: doc that client is thread-safe
2016-03-29 09:28:53 -07:00
Anthony Romano
d533c14881
Merge pull request #4876 from heyitsanthony/integration-races
...
*: fix races from clientv3/integration tests
2016-03-29 09:10:53 -07:00
Anthony Romano
161bc5e19c
clientv3: fix race when setting grpc Logger
...
grpc only permits SetLogger on init()
2016-03-28 23:30:03 -07:00
Hitoshi Mitake
987568c65c
*: add Auth prefix to auth related requests and responses
2016-03-29 14:32:19 +09:00
Anthony Romano
096abb3f37
clientv3/integration: get quorum before watching in TestKVCompact
...
Fixes #4889
2016-03-28 22:18:10 -07:00
Anthony Romano
4bdfc0a46d
clientv3: fix race on writing watch channel over return channel
...
Found in TestElectionFailover
2016-03-28 16:08:18 -07:00
Anthony Romano
91dc6b29a6
clientv3/integration: fix race when setting progress report interval
2016-03-28 16:08:18 -07:00
Anthony Romano
2c83362e63
clientv3: fix race in KV reconnection logic
2016-03-28 16:08:18 -07:00
Anthony Romano
e129223dbe
clientv3: fix race in watcher resume
2016-03-28 16:08:18 -07:00
Xiang Li
fa98d8d337
Merge pull request #4845 from mitake/auth-user
...
*: support adding user in v3 auth
2016-03-27 07:51:10 -07:00
Hitoshi Mitake
8874545a1e
*: support adding user in v3 auth
...
This commit adds a new subcommand "user add" to etcdctlv3. With the
command users can create a user for the authentication.
Example of usage:
$ etcdctlv3 user add user1
Password of user1:
Type password of user1 again for confirmation:
2016-03-27 18:11:42 +09:00
Gyu-Ho Lee
29fccb3221
clientv3: configurable grpc logger
2016-03-26 22:38:53 -07:00
Anthony Romano
489779d905
clientv3: rename comparison from CreatedRevision to CreateRevision
...
To match protobuf naming
2016-03-23 09:50:46 -07:00
Xiang Li
88e738fcb6
Merge pull request #4844 from ajityagaty/polish_naming_conventions
...
clientv3: Renaming SortByCreatedRev to maintain consistency.
2016-03-23 09:27:34 -07:00
Ajit Yagaty
2bb417bfff
clientv3: Renaming SortByCreatedRev to maintain consistency.
...
Renamed SortByCreatedRev to SortByCreateRevision to be consistent
with the naming used for SortByModRevision.
2016-03-22 17:56:24 -07:00
Anthony Romano
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
Ajit Yagaty
606889a002
clientv3: Fix inconsistent naming convention in v3 client.
...
In order to have a consistent naming for variable/function names
pertaining to ModifiedRevision, all occurrences have been renamed
to ModRevision.
2016-03-22 14:58:11 -07:00
Xiang Li
d3809abe42
*: gRPC + HTTP on the same port
...
We use cmux to do this since we want to do http+https on the same
port in the near future too.
2016-03-21 14:29:25 -07:00
Gyu-Ho Lee
053bc83fe4
Merge pull request #4810 from gyuho/client_serialized_read
...
clientv3: set Serializable from Op
2016-03-19 14:35:55 -07:00
Gyu-Ho Lee
dae7e009b0
*: godoc clean up
2016-03-19 14:19:23 -07:00
Gyu-Ho Lee
4e4f0ab619
clientv3/concurrency: fix godoc
2016-03-18 16:34:58 -07:00
Gyu-Ho Lee
f38a611b55
clientv3: set Serializable from Op
...
Fix https://github.com/coreos/etcd/issues/4809 .
2016-03-18 15:56:48 -07:00
Anthony Romano
a001651bc1
clientv3: remove dependency on lease package
2016-03-17 11:52:34 -07:00
Anthony Romano
44753594ec
v3rpc: move errors to v3rpc/rpctypes
...
Fixes #4771
2016-03-17 11:52:34 -07:00
Anthony Romano
bc37a32062
clientv3/concurrency: software transactional memory
...
Repeatable read and serialized read STM implementations.
2016-03-16 11:23:06 -07:00
Xiang Li
22065fe334
clientv3: fix mirror and add integration test
2016-03-13 18:27:45 -07:00
Xiang Li
7c377fa703
*: add client.defrag and defrag cmd for etcdctl
2016-03-10 09:30:41 -08:00
Xiang Li
3886129f52
clientv3/integration: fix TestTxnWriteFail
...
It might take client request more than dialtimeout to fail when
we kill the connection when the client is sending request.
2016-03-09 14:03:51 -08:00
Anthony Romano
e026b79c87
clientv3/integration: do not remove client member in TestMemberRemove
...
Fixes #4716
2016-03-08 11:55:26 -08:00
Anthony Romano
78132c9b5b
clientv3: use tls.Config in clientv3.Config
...
Fixes #4648
2016-03-07 16:08:40 -08:00
Anthony Romano
4eeea5ccda
clientv3/integration: remove invalid future revision test
...
Future revisions are now supported, so test is outdated.
2016-03-07 15:52:34 -08:00
Anthony Romano
d21d2e6624
clientv3: don't deadlock on Close with broken connection
...
Fixes #4679
2016-03-07 13:46:54 -08:00
Xiang Li
d84811aecf
*: fix watch full key range
2016-03-05 14:45:43 -08:00
Xiang Li
e708bc14d7
Merge pull request #4689 from hongchaodeng/master
...
watch.go: docs on WatchResponse.Canceled
2016-03-04 16:09:16 -08:00
Hongchao Deng
5e017e94f9
watch.go: docs on WatchResponse.Canceled
2016-03-04 15:51:00 -08:00
Gyu-Ho Lee
450b586011
clientv3: add IsProgressNotify with example
...
This makes the test endpoints same as we have in
goreman proc file, and adds 'IsProgressNotify' method
and the 'WatchProgressNotify' code example to godoc.
2016-03-04 12:16:43 -08:00
Gyu-Ho Lee
4097a72c0b
Merge pull request #4678 from gyuho/watch_notify_clientv3
...
clientv3: add WithProgressNotify
2016-03-04 10:08:25 -08:00
Gyu-Ho Lee
27316196d8
clientv3: add WithProgressNotify
...
Client side for https://github.com/coreos/etcd/issues/4628 .
2016-03-04 09:47:13 -08:00
Anthony Romano
360aafec76
clientv3: include a context in Client
...
Useful for clean up tasks
2016-03-04 09:20:44 -08:00
Anthony Romano
1e16758029
clientv3: add Err() to WatchResponse
...
Checking for number of events as a failure condition was a kludge.
2016-03-03 15:21:04 -08:00
Anthony Romano
3cda514edb
Merge pull request #4676 from heyitsanthony/clientv3-fix-cancel-retry
...
clientv3: do not reconnect if request context is canceled
2016-03-03 14:24:50 -08:00
Anthony Romano
16c35167df
clientv3: do not reconnect on request context cancellation
2016-03-03 13:43:16 -08:00
Anthony Romano
6d3f172c6e
clientv3/concurrency: don't poll in mutex lock on early prior key delete
...
Lock would get the prior key on retry using WithRev(myRev - 1) instead of
using the latest revision; the Watch() would return immediately and Lock
devolves into polling.
2016-03-03 10:04:57 -08:00
Anthony Romano
3327858a54
clientv3/concurrency: move election recipe into clientv3
2016-03-03 00:22:19 -08:00
Hitoshi Mitake
379d04ea53
clientv3: a new interface Auth for auth related RPCs
2016-03-02 15:17:59 +09:00
Anthony Romano
3a9d532140
Merge pull request #4614 from heyitsanthony/future-watch-rpc
...
etcdserver, storage, clientv3: watcher ranges
2016-02-29 15:59:18 -08:00
Gyu-Ho Lee
4bf3756aa8
clientv3: document error handling in README
2016-02-29 15:41:52 -08:00
Anthony Romano
eb327c690b
clientv3: support watcher ranges
2016-02-29 15:20:41 -08:00
Anthony Romano
8dbc6cfd43
etcdserver: ranges in watcher rpc protocol
...
protocol change so watch requests are ranges; server rejects non-prefix ranges
2016-02-29 14:03:27 -08:00
Gyu-Ho Lee
a857d8e27c
clientv3: document error handling
2016-02-29 13:54:35 -08:00
Anthony Romano
4fb25d5f0e
Merge pull request #4613 from heyitsanthony/clientv3-composite
...
clientv3: compose API interfaces into client struct
2016-02-29 11:23:34 -08:00
Anthony Romano
d02b1c982f
clientv3: return closed channel on Watch() cancel
...
was returning nil; difficult to use correctly
Fixes #4626
2016-02-26 12:16:41 -08:00
Anthony Romano
f8c3fa637f
clientv3: use default client lease api
2016-02-25 18:13:26 -08:00
Anthony Romano
8f7d474a6b
clientv3: use default client cluster
2016-02-25 18:13:26 -08:00
Anthony Romano
3e57bbf317
clientv3: use default client kv
2016-02-25 18:13:26 -08:00
Anthony Romano
d430c7baf7
clientv3: use default client watcher
2016-02-25 18:13:26 -08:00
Anthony Romano
5f62c05a6d
clientv3: compose all clientv3 APIs into client struct
2016-02-25 18:13:26 -08:00
Anthony Romano
bfcd39335c
Merge pull request #4619 from heyitsanthony/clientv3-do
...
clientv3: expose Do in KV
2016-02-25 18:11:29 -08:00
Anthony Romano
43689b9a32
clientv3: expose Do in KV
...
Do() makes it possible to pass Ops around and apply them later.
Txn().Then(op).Commit() isn't enough because it will wrap the op
in a txn. Likewise, rewriting single op txns into single op rpc's
precludes deliberately submitting a single op transaction.
2016-02-25 17:33:47 -08:00
Anthony Romano
993fd76b19
clientv3: respect first stream error in lease recv loop
...
Fixes #4622
2016-02-25 16:59:08 -08:00
Gyu-Ho Lee
81f77ee4f3
clientv3: fix txn example code
2016-02-25 10:52:47 -08:00
Gyu-Ho Lee
8f3981c651
Merge pull request #4612 from gyuho/watch_not_panic
...
*: watch true cancel, created for wrong rev
2016-02-24 22:07:03 -07:00
Gyu-Ho Lee
a78604dacb
*: watch true cancel, created for wrong rev
...
This sets Created and Cancel true in pb.WatchResponse
when it has received wrong start revision instead of
panic. So that clientv3 can set 'Canceled' in WatchResponse
as well.
Fix https://github.com/coreos/etcd/issues/4610 .
2016-02-24 20:56:17 -08:00
Anthony Romano
ed44bb00f8
etcdctlv3: lock command
2016-02-24 17:23:40 -08:00
Anthony Romano
d4b2044eb1
clientv3/concurrency: Mutex
2016-02-24 17:23:40 -08:00
Anthony Romano
20b4336cdb
clientv3/concurrency: Session
...
A client may bind itself to a session lease to signal its
continued in participation with the cluster.
2016-02-24 16:40:16 -08:00
Anthony Romano
9f569842f0
clientv3: move syncer to mirror package
...
to be in line with sync meaning process synchronization, not data
synchronization
2016-02-24 14:21:41 -08:00
Anthony Romano
afa0368dcc
*: fix godoc bugs in interfaces and slice fields
...
detected with goword
2016-02-24 00:45:40 -08:00
Gyu-Ho Lee
8f7948641c
contrib/recipes: replace WatchPrefix with Watch
2016-02-23 20:02:24 -08:00
Gyu-Ho Lee
a24d276891
clientv3: combine Watch, WatchPrefix with variadic
...
For https://github.com/coreos/etcd/issues/4598 .
2016-02-23 20:02:21 -08:00
Gyu-Ho Lee
53f94c22b3
Merge pull request #4600 from gyuho/opoption_doc
...
clientv3: add GoDoc to OpOption
2016-02-23 15:36:38 -08:00
Gyu-Ho Lee
5bc08b7475
clientv3: add GoDoc to OpOption
2016-02-23 15:18:33 -08:00
Hongchao Deng
a19b30b7ab
clientv3: kv.Delete typo
2016-02-23 15:07:10 -08:00
Gyu-Ho Lee
72a1e5618b
clientv3: add more code examples
2016-02-23 14:05:36 -08:00
Gyu-Ho Lee
f0686189e5
clientv3: README, GoDoc examples
2016-02-22 14:21:36 -08:00
Anthony Romano
c5b51946eb
*: exported godoc fixups
2016-02-21 20:36:44 -08:00
Anthony Romano
50ad181477
clientv3: support context cancellation on lease keep alives
2016-02-20 23:21:15 -08:00
Anthony Romano
7b82576b60
clientv3: copy correct pointers into txn comparisons
...
Was copying the range variable's pointer; all elements of cmp were the same.
2016-02-20 22:01:33 -08:00
Anthony Romano
11bb07c248
Merge pull request #4564 from heyitsanthony/fix-watchreconnrequest
...
clientv3: fix current watcher reconnection
2016-02-18 15:14:22 -08:00
Anthony Romano
f66162932c
clientv3: fix current watcher reconnection
...
If a current watcher didn't receive any events, a reconnect cycle would
advance its revision to the store's current revision. Instead, reconnect
using the watcher's creation header revision if the watcher hasn't received
any events.
Fixes #4502
2016-02-18 15:01:57 -08:00
Anthony Romano
4fc89678b2
etcdserver: add >= support for v3 delete range
2016-02-18 12:34:04 -08:00
Anthony Romano
59291770d6
clientv3: WithPrefix operation option
2016-02-18 01:27:06 -08:00
Xiang Li
6ba9373962
clientv3/sync: fix getting empty key error
2016-02-15 22:01:11 -08:00
Xiang Li
24a6abaf59
*: move sync logic to clientv3/sync
2016-02-14 22:52:34 -08:00
Anthony Romano
2415303991
clientv3: typedef <-chan WatchResponse to WatchChan
2016-02-12 14:06:59 -08:00
Anthony Romano
8e411b1b3b
clientv3: send compacted revision before closing watch chan
2016-02-12 14:06:59 -08:00
Anthony Romano
ee1a03167d
storage, v3: pass compaction revision through watchresponse
2016-02-12 14:06:59 -08:00
Anthony Romano
6851fffdfb
clientv3: support >= Range requests
...
Turns out grpc will convert an empty byte string to nil, so use "\0" to
indicate Range on >= key in v3 grpc protocol.
2016-02-12 14:06:59 -08:00
Xiang Li
5908e5b601
clientv3: support serializable
2016-02-12 12:24:46 -08:00
Anthony Romano
4854d7f69d
storage: support ranges for >= key
...
If end == "", range(key, end) will give all keys >= key.
2016-02-12 09:45:43 -08:00
Anthony Romano
a78826e025
Merge pull request #4489 from heyitsanthony/fix-watcher-reqresend
...
clientv3: fix bad variable capture in watch request retry
2016-02-11 14:20:17 -08:00
Gyu-Ho Lee
b19d57e1c3
clientv3: fix godoc for member apis
2016-02-11 13:55:38 -08:00
Anthony Romano
3b7bd38a2d
clientv3: fix bad variable capture in watch request retry
...
variables would be niled out when the goroutine runs, causing a crash
2016-02-11 13:35:07 -08:00
Gyu-Ho Lee
5fbf64c144
clienv3: add MemberAdd method based on v3 change
2016-02-11 13:27:34 -08:00
Anthony Romano
3c9e8540a7
clientv3: optionize put and delete
2016-02-10 15:03:11 -08:00
Anthony Romano
51c4894f62
clientv3: ctx-ize KV
2016-02-09 17:42:34 -08:00
Anthony Romano
15c8876e4c
Merge pull request #4455 from heyitsanthony/etcdctlv3-compaction-err
...
etcdctlv3: report compaction error, if any
2016-02-08 19:15:40 -08:00
Anthony Romano
aa9d3c8b74
etcdctlv3: report compaction error, if any
2016-02-08 15:09:03 -08:00
Anthony Romano
4f41d361a8
clientv3: make compare compliant with proposed txn usage
2016-02-08 13:48:29 -08:00
Anthony Romano
8dcd24bd64
clientv3: withOption for Gets
2016-02-08 13:11:55 -08:00
Anthony Romano
b7eb539b7a
clientv3/integration: add delay after restart in TestTxnWriteFail
...
CI was timing out with publish failures
2016-02-05 16:44:41 -08:00
Xiang Li
bc3fc4ea33
*: add etcdserver namespace for rpc error
2016-02-05 15:13:24 -08:00
Anthony Romano
a6008f41e2
clientv3: retry remote connection on txn write failure
2016-02-05 11:51:44 -08:00
Anthony Romano
0385734111
clientv3/integration: KV retry tests
...
make sure Get will succeed after reconnect cycle with and without Put failure
2016-02-05 10:56:42 -08:00
Anthony Romano
e3e4d09653
clientv3/integration: add timeouts to TestTxnWriteFail
...
so it doesn't take ten minutes to fail
2016-02-05 10:24:56 -08:00
Gyu-Ho Lee
d21ef68a0c
Merge pull request #4413 from gyuho/TestKVCompact
...
clientv3/integration: add TestKVCompact
2016-02-04 14:14:37 -08:00
Gyu-Ho Lee
5b4b1c7039
clientv3/integration: add TestKVCompact
2016-02-04 13:45:51 -08:00
Anthony Romano
9523c2d29f
clientv3/integration: txn tests
2016-02-04 08:40:24 -08:00
Anthony Romano
c07fc3e08e
Merge pull request #4407 from heyitsanthony/txn-no-retry
...
clientv3: don't retry txns that may modify the store
2016-02-03 15:37:49 -08:00
Anthony Romano
b6a08a97e2
clientv3: don't retry txns that may modify the store
2016-02-03 14:55:16 -08:00
Quentin Perez
86aafcd15a
clientv3/integration: fix args format in Errorf/Printf
2016-02-03 22:17:58 +01:00
Xiang Li
c7876d4111
clientv3/integration: fix member remove
...
Do not connect to the member to remove.
2016-02-02 20:49:00 -08:00
Xiang Li
20673e384a
Merge pull request #4382 from xiang90/lease_keep_test
...
clientv3/integration: test lease keepalive
2016-02-02 12:01:22 -08:00
Xiang Li
5f9f56ca17
Merge pull request #4383 from xiang90/client_no_end
...
clientv3: add no endpoint error
2016-02-02 12:00:44 -08:00
Xiang Li
7a91108b91
clientv3: add no endpoint error
2016-02-02 11:01:58 -08:00
Xiang Li
fd0e68d16b
clientv3/integration: test lease keepalive
2016-02-02 10:59:22 -08:00
Anthony Romano
5f20aaa457
Merge pull request #4360 from heyitsanthony/v3-client-watcher
...
V3 client watcher
2016-02-01 23:39:30 -08:00
Gyu-Ho Lee
87ed04ea6f
Merge pull request #4372 from gyuho/kv_delete
...
clientv3/integration: add TestKVDelete*
2016-02-01 23:30:11 -08:00
Anthony Romano
580c563ed6
clientv3: watcher implementation
2016-02-01 23:21:55 -08:00
Anthony Romano
826df1787a
Merge pull request #4373 from heyitsanthony/clientv3-unix-endpoints
...
clientv3: support unix endpoints
2016-02-01 22:49:49 -08:00
Xiang Li
3f29e730eb
Merge pull request #4374 from xiang90/member_api
...
clientv3: implement cluster api
2016-02-01 22:49:43 -08:00
Anthony Romano
b74a42b286
clientv3: support unix endpoints
2016-02-01 22:24:42 -08:00
Anthony Romano
eb8ab3ace4
clientv3: synchronous lease Close
2016-02-01 22:24:42 -08:00
Xiang Li
a9bd30b4af
clientv3: do not retry on modifications
2016-02-01 21:54:40 -08:00
Xiang Li
a25423ca99
clientv3: implement cluster api
2016-02-01 21:46:23 -08:00
Gyu-Ho Lee
e49ae8b03f
clientv3/integration: add TestKVDelete*
2016-02-01 17:07:52 -08:00
Gyu-Ho Lee
24f5640d83
Merge pull request #4371 from gyuho/govet_lease
...
clientv3: fix shadowed variables in lease
2016-02-01 15:17:38 -08:00
Gyu-Ho Lee
f7692cf5d2
clientv3: fix shadowed variables in lease
2016-02-01 15:08:24 -08:00
Gyu-Ho Lee
7d278ef6bb
clientv3/integration: TestKVPut with lease id
2016-02-01 14:46:20 -08:00
Xiang Li
bef7887c0d
clientv3/integration: add basic lease test
2016-02-01 12:59:44 -08:00
Xiang Li
8431801814
lease: fix lease init race
2016-02-01 12:07:34 -08:00
Xiang Li
220fba32a3
Merge pull request #4353 from xiang90/lease
...
clientv3: initial lease
2016-02-01 10:40:44 -08:00
Xiang Li
f2c24dec05
clientv3: initial lease
2016-02-01 09:55:32 -08:00
Anthony Romano
20461ab11a
*: fix many typos
2016-01-31 21:42:39 -08:00
Gyu-Ho Lee
71c2a9bb3c
*: fix minor typos, comments
2016-01-30 18:15:56 -08:00
Gyu-Ho Lee
f6215574f2
*: kv range to return current revision
...
This changes the behavior of KV's range and tx range to return
current revision rather than range revision. This makes populating
range response header easier.
2016-01-30 17:37:34 -08:00
Gyu-Ho Lee
57dedd8c89
Revert "*: TestKVRange to clientv3/integration, fix rev"
2016-01-29 18:20:56 -08:00
Anthony Romano
f6031b9d11
Merge pull request #4349 from heyitsanthony/v3-client-conntls
...
V3 client TLS
2016-01-29 17:05:38 -08:00
Anthony Romano
ca9bd575b1
integration: v3 grpc tls tests
2016-01-29 16:38:52 -08:00
Anthony Romano
f37c896159
clientv3: support tls
2016-01-29 16:37:18 -08:00
Gyu-Ho Lee
69abdf8144
*: TestKVRange to clientv3/integration, fix rev
...
For https://github.com/coreos/etcd/issues/4338 .
And resp.Header.Revision should be from the one in storage
when we just do range, because there is no storage data
change.
2016-01-29 16:12:21 -08:00
Shawn Smith
1ac0ca5317
clientv3/integration: add tt.key string formatting verb to Fatalf call
2016-01-29 15:56:04 +09:00
Gyu-Ho Lee
1767788074
*: expose integration functions for clientv3
2016-01-28 21:21:34 -08:00
Xiang Li
85bfbfa5ad
clientv3: threadsafe
2016-01-28 16:41:09 -08:00
Xiang Li
eb03d48034
clientv3: hook up KV and Txn
2016-01-28 15:15:21 -08:00
Xiang Li
aef77f9829
Merge pull request #4329 from xiang90/client_txn
...
clientv3: initial txn
2016-01-28 14:49:26 -08:00
Xiang Li
92653dcbfb
clientv3: initial txn
2016-01-28 14:27:42 -08:00
Anthony Romano
64413927cc
clientv3: support connection timeout
2016-01-28 13:25:45 -08:00
Anthony Romano
7cc02bc143
clientv3: fix vet warnings
2016-01-28 13:25:10 -08:00
Xiang Li
5bd930c9d2
Merge pull request #4325 from xiang90/client_lease
...
clientv3: lease initial api
2016-01-28 10:49:50 -08:00
Xiang Li
937eeafc3a
Merge pull request #4323 from xiang90/client_watch
...
clientv3: initial watch API
2016-01-28 10:49:33 -08:00
Xiang Li
026c2e7a7c
clientv3: lease initial api
2016-01-28 09:20:29 -08:00
Xiang Li
205ffa5cb6
clientv3: initial watch API
2016-01-28 08:54:32 -08:00
Xiang Li
2d2f14385d
clientv3: fill in kv ops
2016-01-28 08:17:53 -08:00
Xiang Li
a3b7876a3c
clientv3: use retryConnection
2016-01-27 22:31:15 -08:00
Anthony Romano
3df91f85c4
Merge pull request #4312 from heyitsanthony/v3-client-connretry
...
clientv3: connection retry and customizable endpoint selection
2016-01-27 20:57:38 -08:00
Xiang Li
dba92346f3
etcdclientv3: setup initial structure
2016-01-27 20:36:36 -08:00
Anthony Romano
2db2f381fb
clientv3: connection retry and customizable endpoint selection
2016-01-27 19:27:31 -08:00
Anthony Romano
163812246f
Merge pull request #4306 from heyitsanthony/v3-client
...
replace raw v3 grpc connections with clientv3.Client
2016-01-27 14:52:40 -08:00
Xiang Li
e4dab0f40d
clientv3: add initial kv api for client
2016-01-27 14:05:55 -08:00
Anthony Romano
5ccf7f5151
clientv3: small client wrapper
...
mostly to standardize etcd grpc dials
2016-01-27 12:13:12 -08:00