-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
clientv3: close streams after use in lessor keepAliveOnce method #14357
Conversation
Thanks @amdprophet for the PR, but please submit a PR for |
Streams are now closed after being used in the lessor `keepAliveOnce` method. This prevents the "failed to receive lease keepalive request from gRPC stream" message from being logged by the server after the context is cancelled by the client. Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
628a489
to
295044f
Compare
@ahrtr updated |
Codecov Report
@@ Coverage Diff @@
## main #14357 +/- ##
==========================================
- Coverage 75.40% 75.14% -0.27%
==========================================
Files 457 457
Lines 37139 37144 +5
==========================================
- Hits 28006 27913 -93
- Misses 7376 7461 +85
- Partials 1757 1770 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @amdprophet
cc @spzala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @amdprophet
We use
client.KeepAliveOnce
heavily in Sensu Go. Since upgrading to Etcd 3.5 we've seen an excessive amount of logs containingfailed to receive lease keepalive request from gRPC stream
when logging at debug level. I believe this is happening as there's no attempt to close the stream after thekeepAliveOnce
method has completed. The stream is instead closed by the deferred call to cancel the context.The log lines no longer appear after attempting to close the stream using the code in this PR.