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

Add the ability for the SDK server to remove closed streams #3327

Closed
antiphp opened this issue Aug 16, 2023 · 0 comments · Fixed by #3328
Closed

Add the ability for the SDK server to remove closed streams #3327

antiphp opened this issue Aug 16, 2023 · 0 comments · Fixed by #3328
Labels
kind/feature New features for Agones

Comments

@antiphp
Copy link
Contributor

antiphp commented Aug 16, 2023

Is your feature request related to a problem? Please describe.
The SDK server is not able to handle closed streams. Watching for game server updates leads to frequent errors in the sidecar.

When the connection is closed anyway, the sidecar log prints an error at least on every resync (default 30s?) which becomes quiet noisy for a non-error situation (from the game server perspective).

Describe the solution you'd like
In Go it's a best practice to clean up resources that you no longer need. Keeping a GRPC stream open forever for no reason is not necessary.

The suggested solution removes the stream from the connected stream slice, if the context is done, usually by cancellation.

Describe alternatives you've considered
The alternative approach was to implement something on the client to keep reading from the stream, but discarding any received message. It adds unnecessary complexity and just circumvents bad behavior at the wrong place.

Another possibility would be to drop the error messages when logs are collected (e.g. by Loki), but that's just not an option.

Additional context
I noticed reports/discussions around "unwatch", e.g. #2939 but I didn't see a valid reason to not implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant