etcd/server/storage/mvcc
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
..
testutil Fix goimports in all existing files. Execution of ./scripts/fix.sh 2022-12-29 09:41:31 +01:00
doc.go server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
hash.go Fix goimports in all existing files. Execution of ./scripts/fix.sh 2022-12-29 09:41:31 +01:00
hash_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
index.go upate:use google/btree in the genric way 2022-09-27 10:16:15 +08:00
index_bench_test.go update: add benchmark test 2022-09-27 14:33:02 +08:00
index_test.go upate:use google/btree in the genric way 2022-09-27 10:16:15 +08:00
key_index.go upate:use google/btree in the genric way 2022-09-27 10:16:15 +08:00
key_index_test.go comments: fix comments as per goword in go test files 2022-11-23 23:05:42 +05:30
kv.go server: Extract hasher to separate interface 2022-06-13 18:20:18 +02:00
kv_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
kv_view.go server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
kvstore.go tests: Add compact failpoints 2022-11-15 14:59:03 +01:00
kvstore_bench_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
kvstore_compaction.go test: add CompactionSleepInterval in FakeStore's config 2023-01-20 06:25:09 +08:00
kvstore_compaction_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
kvstore_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
kvstore_txn.go Fix goimports in all existing files. Execution of ./scripts/fix.sh 2022-12-29 09:41:31 +01:00
metrics.go mvcc: clean up duplicate metrics name 2022-03-01 18:00:07 +08:00
metrics_txn.go Cleanup remaining TODOs for/past 3.5 release 2021-08-06 13:29:25 +02:00
revision.go mvcc: Remove unused revisions and change comment rev to modified 2022-09-14 23:36:54 +08:00
revision_test.go server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
store.go rename LockWithoutHook to LockOutsideApply and add LockInsideApply 2022-04-07 05:35:13 +08:00
store_test.go add missing copyright headers 2022-11-23 19:13:43 +11:00
watchable_store.go etcdserver: Guarantee order of requested progress notifications 2023-04-05 11:54:10 +01:00
watchable_store_bench_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
watchable_store_test.go server: Test watch restore 2023-03-20 11:15:41 +01:00
watchable_store_txn.go server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
watcher.go etcdserver: Guarantee order of requested progress notifications 2023-04-05 11:54:10 +01:00
watcher_bench_test.go chore: refactor cleanup fn in mvcc test 2023-03-19 21:46:03 +08:00
watcher_group.go server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
watcher_test.go etcdserver: Guarantee order of requested progress notifications 2023-04-05 11:54:10 +01:00