-
Notifications
You must be signed in to change notification settings - Fork 226
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
metrics: fix memory leak #390
Conversation
@iulianpascalau and/or @sidenaio, could you verify that this fixes the issue? |
This fix resolves a leak. I don't know a business logic of code but it's been changed. After the fix, original tag map (from dht.ctx) never changes and each iteration of a loop will mutate initial state of map. So this code doesn't accumulate metrics. |
The metrics are being recorded in |
go.mod
Outdated
@@ -27,3 +27,5 @@ require ( | |||
go.opencensus.io v0.21.0 | |||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522 | |||
) | |||
|
|||
go 1.13 |
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.
Intentional?
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.
Bah.
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.
I've dropped this to 1.12 so it stops complaining. Although... We're going to merge some TLS changes pretty soon that'll force 1.13.
fixes #389
Credit goes to @sidenaio for finding this.