77 Commits

Author SHA1 Message Date
Anthony Romano
5ee85bea7c v3rpc: fix race on watch progress map
Found in TestElectionWait
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
Xiang Li
036ed87c6d *: support watch from future revision 2016-03-07 10:57:30 -08:00
Xiang Li
d84811aecf *: fix watch full key range 2016-03-05 14:45:43 -08:00
Xiang Li
b1521570b6 v3api: support progress 2016-03-03 13:58:15 -08:00
Anthony Romano
c0eac7ab72 storage: support watch on 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
4a0a83380e *: return -1 for canceled watch request 2016-02-26 14:26:46 -08: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
af225e7433 v3rpc: don't race on current watcher header revision 2016-02-17 14:03:52 -08:00
Anthony Romano
59e7be4a2a v3api: send watch events only after sending watchid creation
If events show up before the watch id, the client won't be able
to match the event with the requested watcher.
2016-02-17 01:06:55 -08:00
Anthony Romano
ee1a03167d storage, v3: pass compaction revision through watchresponse 2016-02-12 14:06:59 -08:00
Xiang Li
3ed404633a v3rpc: add compacted field from wresp 2016-02-02 23:24:15 -08:00
Gyu-Ho Lee
ad15bdcb07 etcdserver: update gRPC, proto interface 2016-01-26 17:41:19 -08:00
Gyu-Ho Lee
366e7a879f *: fill in WatchResponse.Header
Related to coreos#3848.
2016-01-06 15:12:53 -08:00
Anthony Romano
21a6ade53d storage: change type of WatchIDs from int64 to WatchID 2016-01-04 19:52:22 -08:00
Gyu-Ho Lee
556d4a6932 *: remove CancelFunc return for Watch. Use Cancel for watch. 2016-01-04 16:17:55 -08:00
Gyu-Ho Lee
6540f47dfa *: WatchResponse for multiple Events with WatchID
storage/storagepb: remove watchID from Event

storage: add WatchResponse to watcher.go to wrap events, watchID

storage: watchableStore to use WatchResponse

storage: kv_test with WatchResponse

etcdserver/api/v3rpc: watch to receive storage.WatchResponse type
2016-01-03 16:32:48 -08:00
Xiang Li
eda0eefc25 *: support watcher cancellation inside watchStream 2016-01-03 00:20:21 -08:00
Xiang Li
ec12686233 v3api: add support for sending watcher control response 2016-01-02 22:31:22 -08:00
Xiang Li
ee0b3f42ed *: rename watcher to watchStream
Watcher vs Watching in storage pkg is confusing. Watcher should be named
as watchStream since it contains a channel as stream to send out events.
Then we can rename watching to watcher, which actually watches on a key
and send watched events through watchStream.

This commits renames watcher to watchStram.
2016-01-02 16:03:57 -08:00
Xiang Li
ac330bb7c9 *: update watch related proto
1. Add watch/cancel request
2. Add necessary fields in response to return watch error
3. Add watch_id into watch response
2016-01-01 10:22:21 -08:00
Gyu-Ho Lee
8f03c600b5 etcdserver/api/v3rpc: watch.go with events slice 2015-12-31 19:25:15 -08:00
ngaut
e142e073e8 v3rpc: Tiny clean up
unreachable code
2015-12-02 12:30:21 +08:00
Xiang Li
b868f4b1b1 v3rpc: report eventReceived correctly 2015-11-19 22:44:46 -08:00
Xiang Li
3cf90a4dff v3rpc: do not send closing event
When a watch stream closes, both of the watcher.Chan and closec
will be closed.

If watcher.Chan is closed, we should not send out the empty event.
Sending the empty is wrong and waste a lot of CPU resources.
Instead we should just return.
2015-11-19 17:56:15 -08:00
Xiang Li
10de2e6dbe *: serve watch service
Implement watch service and hook it up
with grpc server in etcdmain.
2015-11-03 15:58:34 -08:00