Jonathan Boulle
26160b2154
store: use a larger buffer for eventChan
...
The event channel for watches can drop events too easily in the case of
streaming watches. This increases the buffer to a more useful level.
2014-10-07 01:57:05 -07:00
Jonathan Boulle
1c11f6a144
*: expose etcd-index in watch requests
...
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.
Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Jonathan Boulle
5441c6aa54
etcdserver: correct X-Etcd-Index header
...
This adds an EtcdIndex field to store.Event and uses that as the header
instead of the node's modifiedIndex. To facilitate this in a non-racy
way, we set the EtcdIndex while holding the lock.
2014-09-22 18:56:12 -07:00
Jonathan Boulle
f7444ff300
store: convert Watch to interface
2014-09-09 11:17:53 -07:00
Cenk Alti
8bed1e1f15
fix(store/watch): fix the slow consumer bug
2014-02-14 16:52:40 -08:00
Xiang Li
c844fccf2a
fix(watcher_hub) isHidden checks the length of the watchPath before getting subString of keyPath
2014-02-06 11:09:47 -05:00
Xiang Li
5851cb5b8d
chrod(watcher_hub) add comment to isHidden function
2014-02-05 23:31:38 -05:00
Xiang Li
ba98de6ef0
fix(watch hidden key) Fix hidden keys preventing deeper recursive watches from receiving events
...
If a watcher has given the correct hidden directory, we should allow it to watch the non-hidden events under that hidden directory. This pull request achieves this by checking if the path after the watching prefix has a "/_" which indicates a hidden key.
2014-02-05 22:34:41 -05:00
tobz
823fdfab12
fix(store): make isHidden see if any portion of the path is hidden, not just the last element
2014-01-22 09:29:33 -05:00
tobz
7a948746a8
fix(store): move logic to handle whether or not to notify (re: hidden keys) entirely into watcher hub
2014-01-22 09:02:42 -05:00
tobz
139f59f7d1
fix(store): properly hide hidden keys from watchers, not just gets
2014-01-21 20:26:56 -05:00
Cenk Alti
8597904bc2
feat(stream watchers) fix locking issue
2014-01-10 16:04:23 +02:00
Xiang Li
22a25a18b3
feat(stream watchers) add stream watcher support
2014-01-09 15:28:33 +08:00
Xiang Li
fa3b4a7941
refactor(watcher) change newWatcher to Watch
2014-01-09 13:29:04 +08:00
Xiang Li
bbbf8fd574
fix(watcher_hub.go) decrease count when remove a watcher
2013-12-28 15:51:16 +08:00
Xiang Li
d66dc3c1c7
refactor(watcher_hub.go) refactor notifyWatchers()
2013-12-28 15:49:05 +08:00
Xiang Li
59ccefee0f
fix(watchhub.go) add a lock to protect the hashmap
2013-12-28 14:55:50 +08:00
Xiang Li
5e499456f0
init cancel watcher
2013-12-26 22:06:15 +08:00
Xiang Li
c6e1af8321
merge master
2013-12-02 22:36:38 -05:00
Xiang Li
5097a2adee
fix(event_history.go) should not scan prefix
2013-12-01 00:47:23 -05:00
Xiang Li
b7d07ea5c8
refactor event
2013-11-28 11:33:40 -05:00
Xiang Li
6156d5c790
refactor separate etcd index from raft index
2013-11-09 17:55:54 -08:00
Xiang Li
0372cdea23
refactor move sync command into etcd
2013-11-08 16:00:58 -08:00
Xiang Li
c307b6abca
fix watcher_hub
2013-11-06 21:19:37 -08:00
Xiang Li
55058c64f5
feat wathch for expiring need to be pending
2013-11-05 23:30:48 -08:00
Xiang Li
a71838a59b
refactor watcher.go
2013-10-07 22:17:58 -07:00