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

Fix multiple issues with Watch #238

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

brandond
Copy link
Member

@brandond brandond commented Nov 3, 2023

  • Fixes an error where watching a compacted revision would return events, followed by an error. The watch is now immediately cancelled with an appropriate error, and the compact/current revision fields set.

  • Fixes an error where a high event rate could flood the GRPC stream with single-event watch responses. The event channel reader now merges all available events, and sends them in a single watch message. This was most frequently an issue on sqlite, where all inserts are done locally and immediately wake the polling goroutine to send the event without any opportunity for batching.

Fixes pod watch events being dropped when using kine to reproduce the issue described at kubernetes/kubernetes#121688

Ref: SURE-6953

@brandond brandond requested a review from a team as a code owner November 3, 2023 00:51
@brandond brandond force-pushed the fix-watch branch 2 times, most recently from 617474d to a250337 Compare November 3, 2023 04:22
* Fixes an error where watching a compacted revision would return events, followed by an error.
  The watch is now immediately cancelled with an appropriate error, and the compact/current
  revision fields set.

* Fixes an error where a high event rate could flood the GRPC stream with single-event watch
  responses. The event channel reader now merges all available events, and sends them in a
  single watch message. This was most frequently an issue on sqlite, where all inserts are done
  locally and immediately wake the polling goroutine to send the event without any opportunity
  for batching.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond merged commit c1da9bf into k3s-io:master Nov 3, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants