-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: the leak of prometheus metrics #10655
fix: the leak of prometheus metrics #10655
Conversation
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
t/node/healthcheck-metric.t
Outdated
ngx.say(body) | ||
return | ||
end | ||
ngx.sleep(6) |
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.
It takes too long, try to replace delayed_clear
with clear
when run test cases
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.
This time is set after many attempts. 3, 4, and 5 have a small probability of causing the target to not be cleaned up in time enough.
I don't agree with using clear in test cases, it will make the test cases complicated and difficult to read.
- The checker cannot be obtained directly in the test case.
- The underlying health check library does not support directly calling functions to delete targets.
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
t/node/healthcheck-metric.t
Outdated
obj.delayed_clear = obj.clear | ||
return obj | ||
end | ||
--- timeout: 20 |
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.
remove this
t/node/healthcheck-metric.t
Outdated
local httpc = http.new() | ||
local uri = "http://127.0.0.1:" .. ngx.var.server_port .. "/ping" | ||
local _, _ = httpc:request_uri(uri, {method = "GET", keepalive = false}) | ||
ngx.sleep(3) |
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.
remove this
Signed-off-by: Sn0rt <wangguohao.2009@gmail.com>
This reverts commit 59a6be4.
Description
fix: #10636
Checklist