etcd/server/storage
Peter Wortmann 74feb229c7 etcdserver: Guarantee order of requested progress notifications
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: Peter Wortmann <peter.wortmann@skao.int>
2023-04-05 11:54:10 +01:00
..
backend Merge pull request #15052 from ptabor/20221228-goimports-fix 2022-12-29 11:31:22 +01:00
datadir add missing copyright headers 2022-11-23 19:13:43 +11:00
mvcc etcdserver: Guarantee order of requested progress notifications 2023-04-05 11:54:10 +01:00
schema Goimports: Apply automated fixing to test files as well. 2022-12-29 13:04:45 +01:00
wal etcdserver: add failpoints walBeforeSync and walAfterSync 2023-02-08 09:08:09 +08:00
backend.go etcdserve: format the source code 2022-12-02 13:00:59 +08:00
hooks.go etcdserver: update etcdserver to use the new raft module go.etcd.io/raft/v3 2022-12-02 09:33:45 +08:00
metrics.go server: Move all functions needed for storage bootstrap to storage package 2021-08-03 13:09:15 +02:00
quota.go Applier does not depend on EtcdServer any longer. 2022-05-20 14:32:04 +02:00
storage.go Fix goimports in all existing files. Execution of ./scripts/fix.sh 2022-12-29 09:41:31 +01:00
util.go etcdserve: format the source code 2022-12-02 13:00:59 +08:00