-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/k8sobjects] Fix memory leak caused by pull mode's interval ticker #31919
Merged
TylerHelmuth
merged 3 commits into
open-telemetry:main
from
crobert-1:goleak_k8sobjectsreceiver
Apr 2, 2024
Merged
[receiver/k8sobjects] Fix memory leak caused by pull mode's interval ticker #31919
TylerHelmuth
merged 3 commits into
open-telemetry:main
from
crobert-1:goleak_k8sobjectsreceiver
Apr 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crobert-1
commented
Mar 22, 2024
I'll investigate failing goleak test and mark as |
I wonder how related this is to #31644 |
crobert-1
force-pushed
the
goleak_k8sobjectsreceiver
branch
from
March 28, 2024 23:17
00d0287
to
69e62bd
Compare
I've updated the issue description. |
TylerHelmuth
approved these changes
Apr 2, 2024
TylerHelmuth
approved these changes
Apr 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The k8sobjects receiver was starting a ticker when in pull mode, that would tick every set interval. This ticker needs to be stopped during shutdown, so I added functionality to cancel the context during shutdown, properly stopping the ticker.
The original intention here was to add
goleak
, but due to a bug ininternal/k8stest
it's failing on the end to end test. This change still fixes a bug, so I believe it's worth merging even withoutgoleak
at this point. Note that this change does reduce the number and frequency of goleak failures.Testing:
All existing tests are passing.