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: cleanup metrics state management in runner #860

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

jakobmoellerdev
Copy link
Contributor

This properly deregisters and registers metrics based on the runner of the metrics exporter. This allows to stop the manager runnable and start it at a later time again (e.g. for in-process restarting). This will not affect existing behavior and just allows proper restarting.

All Unregister limitations apply:

Note that even after unregistering, it will not be possible to register a new Collector that is inconsistent with the unregistered Collector, e.g. a Collector collecting metrics with the same name but a different help string. The rationale here is that the same registry instance must only collect consistent metrics throughout its lifetime

@llamerada-jp
Copy link
Contributor

Is this change to address memory (or some resources) leaks? If so, I think I have to change other products (like pvc-autoresizer). I would be grateful if you could tell me.

Signed-off-by: Jakob Möller <jmoller@redhat.com>
@jakobmoellerdev
Copy link
Contributor Author

@llamerada-jp no leak potential the only thing that won't work is restarting the affected runner in process (any case where Register is called twice before calling Unregister). No other side effects AFAIK.

@llamerada-jp llamerada-jp merged commit 2597dc7 into topolvm:main Mar 21, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants