221 Commits

Author SHA1 Message Date
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
Xiang Li
21096bf27f Merge pull request #4963 from xiang90/ht
*: mv etcdhttp into api pkg
2016-04-04 18:40:29 -07: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
2c50eb240e *: mv etcdhttp into api pkg 2016-04-04 16:31:35 -07:00
Gyu-Ho Lee
b0cc0e443c *: clean up if, bool comparison 2016-04-02 12:55:11 -07:00
Anthony Romano
9b2c963179 etcdserver: configurable backend size quota
Configurable with the flag --experimental-quota-backend-bytes and
through ServerConfig.QuotaBackendBytes.

Fixes #4894
2016-03-29 18:39:25 -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
3fbacf4be2 v3rpc: move Hash RPC to Maintenance service 2016-03-28 17:15:58 -07:00
Anthony Romano
91dc6b29a6 clientv3/integration: fix race when setting progress report interval 2016-03-28 16:08:18 -07:00
Anthony Romano
6e3a0948e4 Merge pull request #4868 from heyitsanthony/api-quota
etcdserver: storage quotas
2016-03-28 15:15:57 -07:00
Anthony Romano
a403a94d7b etcdserver: cap new keys on space alarm 2016-03-28 14:56:26 -07:00
Anthony Romano
9c8253c543 etcdserver, v3rpc: space quotas 2016-03-28 14:56:26 -07:00
Anthony Romano
384c3ec907 integration: don't call rand.Intn in TestSTMConflict on 0
Fixes #4874
2016-03-28 13:06:07 -07:00
Xiang Li
70a9391378 *: enable v3 by default 2016-03-23 17:01:36 -07:00
Xiang Li
900a61b023 *: http and https on the same port 2016-03-23 10:28:38 -07:00
Anthony Romano
bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Gyu-Ho Lee
dae7e009b0 *: godoc clean up 2016-03-19 14:19:23 -07:00
Anthony Romano
58c8521920 Merge pull request #4792 from heyitsanthony/snip-snip
clientv3: break etcdserver dependency
2016-03-17 12:24:54 -07:00
Anthony Romano
44753594ec v3rpc: move errors to v3rpc/rpctypes
Fixes #4771
2016-03-17 11:52:34 -07:00
Xiang Li
e6c39108a7 integration: add TestV3LeaseFailover test 2016-03-17 10:17:51 -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
39d307572e integration: fix TestV3WatchFutureRevision
Fix https://github.com/coreos/etcd/issues/4730.

Previously we put keys async and there might be a race when
the watch triggers before the put receives the response. When that
happens, put might fails to get the response since we shutdown the server
when watch triggers.
2016-03-09 09:55:52 -08:00
Anthony Romano
78132c9b5b clientv3: use tls.Config in clientv3.Config
Fixes #4648
2016-03-07 16:08:40 -08:00
Anthony Romano
632461cc50 Merge pull request #4706 from heyitsanthony/fix-client-close-deadlock
clientv3: don't deadlock on Close with broken connection
2016-03-07 14:02:12 -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
036ed87c6d *: support watch from future revision 2016-03-07 10:57:30 -08:00
Anthony Romano
a31f84121b Merge pull request #4699 from heyitsanthony/fix-barrier
storage: use creation revision to compute txn event types
2016-03-05 19:17:56 -08:00
Anthony Romano
713f7c056f storage: use creation revision to compute txn event types
Fixes #4688
2016-03-05 19:03:07 -08:00
Xiang Li
633a0bdf55 integration: add test for full range watching 2016-03-05 18:52:41 -08:00
Anthony Romano
360aafec76 clientv3: include a context in Client
Useful for clean up tasks
2016-03-04 09:20:44 -08:00
Xiang Li
44151ba531 integration: add TestV3PutOnNonExistLease 2016-03-03 20:32:44 -08:00
Xiang Li
b1521570b6 v3api: support progress 2016-03-03 13:58:15 -08:00
Anthony Romano
3327858a54 clientv3/concurrency: move election recipe into clientv3 2016-03-03 00:22:19 -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
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
Gyu-Ho Lee
4a0a83380e *: return -1 for canceled watch request 2016-02-26 14:26:46 -08:00
Anthony Romano
3e57bbf317 clientv3: use default client kv 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
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
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
Gyu-Ho Lee
fc86e1ded1 *: return the number of deleted keys
For https://github.com/coreos/etcd/issues/4576.
2016-02-21 17:59:21 -08:00
Anthony Romano
3bb3351ca0 contrib/recipes: use clientv3 kv API 2016-02-21 14:43:41 -08:00
Anthony Romano
270fa00e54 integration: fix go vet -shadow error
breaking go tip
2016-02-18 12:26:35 -08:00
Anthony Romano
ef2d3feca6 Merge pull request #4528 from heyitsanthony/fix-watchcurrev
fix several watcher races
2016-02-17 14:26:33 -08:00
Anthony Romano
155412bbfa integration: overlapped create and put v3 watcher test 2016-02-17 14:03:52 -08:00
Anthony Romano
019a145304 integration: put keys after watcher ack in TestV3WatchFromCurrentRevision
Watcher would miss events since the keys would be created after
sending the watcher request but before etcd registered the watcher.
2016-02-17 01:06:52 -08:00
Anthony Romano
0f7f375043 contrib/recipes: fix revision race in double barrier
current kv revision might be ahead of ready put event; watch using key's mod
revision instead.

Fixes #4425
2016-02-13 11:57:12 -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