Benjamin Wang
90e4d04c8e
etcdserver: guarantee order of requested progress notification
...
Progress notifications requested using ProgressRequest were sent
directly using the ctrlStream, which means that they could race
against watch responses in the watchStream.
This would especially happen when the stream was not synced - e.g. if
you requested a progress notification on a freshly created unsynced
watcher, the notification would typically arrive indicating a revision
for which not all watch responses had been sent.
This changes the behaviour so that v3rpc always goes through the watch
stream, using a new RequestProgressAll function that closely matches
the behaviour of the v3rpc code - i.e.
1. Generate a message with WatchId -1, indicating the revision for
*all* watchers in the stream
2. Guarantee that a response is (eventually) sent
The latter might require us to defer the response until all watchers
are synced, which is likely as it should be. Note that we do *not*
guarantee that the number of progress notifications matches the number
of requests, only that eventually at least one gets sent.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 12:47:09 +08:00
Hitoshi Mitake
01c0d8b309
etcdserver: keep server side change of 14548
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-03-28 21:43:17 +09:00
Hitoshi Mitake
c8f890cde1
Revert "*: handle auth invalid token and old revision errors in watch"
...
This reverts commit 0c6e466024ea2030380b13e3e2248b0b8fb879ca.
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-03-21 22:13:17 +09:00
Kafuu Chino
ed10ca13f4
*: avoid closing a watch with ID 0 incorrectly
...
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>
add test
1
1
1
2022-10-10 19:54:58 +08:00
Hitoshi Mitake
0c6e466024
*: handle auth invalid token and old revision errors in watch
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-04 22:49:06 +09:00
Benjamin Wang
cc1b0e6a44
do not get previous K/V for create event
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-01 13:11:46 +08:00
Chris Wedgwood
656dc63eab
etcdserver: fix incorrect metrics generated when clients cancel watches
...
Manual cherry-pick of 9571325fe85173a60c89d6ac6ce3491c7b1ec7a4 for
release-3.4.
2021-03-31 22:59:29 -07:00
jingyih
75d5e78d1f
*: fix backport of PR12216
...
Fix bugs introduced in commit c60dabf
2020-08-16 15:01:18 +08:00
jingyih
c60dabf2f3
*: add experimental flag for watch notify interval
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-15 10:24:25 -07:00
Changxin Miao
9c8554573f
etcdserver: watch stream got closed once one request is not permitted ( #11708 )
2020-04-06 07:06:57 -07:00
Zeming YU
b6cfaf883b
v3rpc: fix a typo err
...
don't read return value in child goroutine which causes data race.
2019-08-06 15:09:47 -07:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Gyuho Lee
1399bc69ce
etcdserver: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Joe Betz
4b51b6de49
*: Add progress notify request watch request
2018-06-27 16:46:13 -07:00
Gyuho Lee
a5b32ba941
etcdserver/api/v3rpc: add "etcd_network_server_stream_failures_total"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 08:05:43 -07:00
Gyuho Lee
294b5745d6
etcdserver/api/v3rpc: support watch fragmentation with max request bytes
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 12:35:50 -07:00
Gyuho Lee
7088d2bf52
etcdserver/api/v3rpc: clean up, read lock on "prevKV"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 12:35:50 -07:00
Gyuho Lee
e1df2156c7
etcdserver/api/v3rpc: clean up godoc
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 12:35:50 -07:00
Gyuho Lee
6cf3dae93e
etcdserver/api/v3rpc: fix race in stream error logging
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-01 16:19:55 -07:00
Gyuho Lee
bdbed26f64
etcdserver: support structured logging
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
4f754c1850
etcdserver: clean up with "RaftStatusGetter"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 19:30:08 -04:00
Gyuho Lee
8a518b01c4
*: revert "internal/mvcc" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
bb95d190c1
*: revert "internal/auth" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Xiang
142bff89f4
v3rpc: add jitter to progress notification
2018-02-05 10:37:12 -08:00
Hitoshi Mitake
6c91766490
*: move "auth" to "internal/auth"
2018-01-29 14:57:35 +09:00
Gyuho Lee
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Xiang Li
44e1f6f019
Merge pull request #9105 from spzala/getrevision
...
etcdserver/api/v3rpc: debug user cancellation and log warning for rest
2018-01-08 10:07:57 -08:00
Sahdev P. Zala
a66d7c3ba5
etcdserver/api/v3rpc: debug user cancellation and log warning for rest
...
The context error with cancel code is typically for user cancellation which
should be at debug level. For other error codes we should display a warning.
Fixes #9085
2018-01-08 11:03:13 -05:00
Gyuho Lee
65464838ba
Merge pull request #9065 from gyuho/watch-id-2
...
*: allow user-provided watch ID to mvcc
2018-01-05 15:08:10 -08:00
Gyuho Lee
9a50255515
etcdserver/api/v3rpc: log stream error with debug level
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 07:44:07 -08:00
Gyuho Lee
33c732b97c
api/v3rpc: add watch ID to "watchStream.Watch"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-31 13:20:41 -08:00
Gyu-Ho Lee
6bd41f36ff
api/v3rpc: log grpc stream send/recv errors in server-side
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-29 17:34:05 -08:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
6fb08672d8
v3rpc: set canceled=true when stream is compacted
...
Fixes #8231
2017-07-25 12:36:01 -07:00
Hitoshi Mitake
939912c425
clientv3, etcdserver: support auth in Watch()
2017-05-20 11:34:45 +09:00
Anthony Romano
135a40751e
v3rpc: force RangeEnd=nil if length is 0
...
gRPC will replace empty strings with nil, but for the embedded case it's
possible for []byte{} to slip in and confuse the single key / >= key
watch logic.
2017-04-07 16:36:38 -07:00
Anthony Romano
9a20743190
v3rpc: don't close watcher if client closes send
...
grpc-gateway will CloseSend but still want to receive updates.
2016-11-17 15:33:37 -08:00
Gyu-Ho Lee
4d3b281369
etcdserver: fix spell errors
2016-08-13 20:54:48 -07:00
Anthony Romano
299ebc6137
v3rpc: don't elide next progress notification on progress notification
...
Fixes #5878
2016-07-20 11:37:20 -07:00
Xiang Li
58aa3483c3
grpcproxy: add filter to watcher
2016-07-18 13:02:34 -07:00
Xiang Li
427496ebb8
v3rpc: lock progress and prevKV map correctly
2016-07-07 15:01:05 -07:00
Xiang Li
929d6ab62c
Merge pull request #5850 from xiang90/get_o_kv
...
*: support get-old-kv in watch
2016-07-05 16:37:24 -07:00
Xiang Li
c853704ac9
*: support get-old-kv in watch
2016-07-05 16:17:09 -07:00
Xiang Li
13a4056327
v3rpc: do not panic on user error for watch
2016-07-03 08:57:48 -07:00
Xiang Li
dced92f8bd
*: support watch with filters
...
Now user can filter events with types. The API is also extensible.
It might make sense for the proxy to filter out events based on
more expensive/customized filter.
2016-06-28 13:46:57 -07:00
Xiang Li
6f28b43806
*: fix pending events metrics
2016-06-19 23:00:39 -07:00
Anthony Romano
09e8f5782e
v3rpc: fix race on closing watcher stream ctrl channel
...
Sometimes close would race with the recvLoop, leading the
recvLoop to write to a close channel.
2016-05-31 11:07:31 -07:00
Anthony Romano
c438310634
v3rpc: make watcher wait for its send goroutine to finish
2016-05-27 16:54:26 -07:00
Gyu-Ho Lee
abb4cd5646
etcdserver: update LICENSE header
2016-05-12 20:49:40 -07:00