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 memory leak #1644

Merged
merged 2 commits into from
Oct 26, 2020
Merged

Fix memory leak #1644

merged 2 commits into from
Oct 26, 2020

Conversation

darkdarkdragon
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Fixes memory leak caused by unbuffered channels

Specific updates (required)
Added buffers to channels

How did you test each of these updates (required)
unit tests

Does this pull request close any open issues?

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

@@ -25,6 +25,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slick name. this makes me want to do go.livepeer.org/whatever for purely cosmetic reasons

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea 😃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we totally should, looks like it's as easy as https://github.com/GoogleCloudPlatform/govanityurls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we need package to publish 😃

@iameli
Copy link
Contributor

iameli commented Oct 22, 2020

Interesting that we've never noticed this. When would it show up?

@darkdarkdragon darkdarkdragon marked this pull request as ready for review October 22, 2020 21:20
@darkdarkdragon darkdarkdragon requested a review from iameli October 22, 2020 21:20
@darkdarkdragon
Copy link
Contributor Author

Interesting that we've never noticed this. When would it show up?

Found it in the logs for #1640
It leaks only when GetOrchestrator request takes more than 3 second. And to notice this we should add alert on number of goroutines.

Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darkdarkdragon darkdarkdragon merged commit 1169920 into master Oct 26, 2020
@darkdarkdragon darkdarkdragon deleted the it/memory-leak branch October 26, 2020 19:50
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.

3 participants