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

auto-pause: make it memory-leak proof #10596

Closed
medyagh opened this issue Feb 24, 2021 · 4 comments · Fixed by #11909
Closed

auto-pause: make it memory-leak proof #10596

medyagh opened this issue Feb 24, 2021 · 4 comments · Fixed by #11909
Assignees
Labels
co/auto-pause kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@medyagh
Copy link
Member

medyagh commented Feb 24, 2021

each call of time.After creates a new timer instance which is not released until the timer fired. If we have high traffic in incomeCh we'll end up with a lot of pending timers

https://groups.google.com/g/golang-nuts/c/cCdm0Ixwi9A

Originally posted by @ilya-zuyev in #10427 (comment)

https://www.fatalerrors.org/a/use-with-caution-time.after-can-cause-memory-leak-golang.html

@medyagh medyagh added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. co/auto-pause labels Feb 24, 2021
@medyagh medyagh added this to the v.1.19.0-candidate milestone Feb 26, 2021
@hetong07
Copy link
Contributor

hetong07 commented Mar 2, 2021

/assign

@medyagh
Copy link
Member Author

medyagh commented Mar 2, 2021

@hetong07 thanks for picking this up, let me know if u need help or have questions

@vishjain
Copy link
Contributor

vishjain commented Jul 6, 2021

/assign

@vishjain
Copy link
Contributor

vishjain commented Jul 6, 2021

Saw this issue had gotten abandoned and wanted some practice on this part of the codebase because I'm working on another related auto-pause feature. Hope this is ok - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/auto-pause kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
4 participants