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

pkg/chunkenc: fix leak of pool. #1793

Merged
merged 1 commit into from
Mar 11, 2020
Merged

Conversation

johncming
Copy link
Contributor

There is a situation than some items from the pool can't put back to the pool when return after error.

Signed-off-by: johncming <johncming@yahoo.com>
@CLAassistant
Copy link

CLAassistant commented Mar 11, 2020

CLA assistant check
All committers have signed the CLA.

@pstibrany
Copy link
Member

I believe that's intentional. They are not leaked, but will be garbage collected.

@johncming
Copy link
Contributor Author

I believe that's intentional. They are not leaked, but will be garbage collected.

Yes, the unused objects are always gc-ed. But using pool here is for alleviating many tiny allocations.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM I don't think this is going to make a huge difference as this is never really happening.

But for the sake of doing it cleanly, let's go !

@cyriltovena cyriltovena merged commit 13c9a86 into grafana:master Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants