Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.5] etcdserver: guarantee order of requested progress notifications #15695

Merged
merged 1 commit into from Apr 11, 2023

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented Apr 11, 2023

Backport #15237 to 3.5

Link to #15585

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>
@ahrtr ahrtr force-pushed the 3.5_request_progress_20230411 branch from 640f5ce to cd01925 Compare April 11, 2023 01:52
@ahrtr
Copy link
Member Author

ahrtr commented Apr 11, 2023

cc @mitake @ptabor @serathius @spzala

@ahrtr ahrtr changed the title [3.5] etcdserver: Guarantee order of requested progress notifications [3.5] etcdserver: guarantee order of requested progress notifications Apr 11, 2023
@serathius serathius merged commit 3cd07fe into etcd-io:release-3.5 Apr 11, 2023
12 checks passed
tjungblu pushed a commit to tjungblu/etcd that referenced this pull request Jul 26, 2023
…0411

[3.5] etcdserver: guarantee order of requested progress notifications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants