-
Notifications
You must be signed in to change notification settings - Fork 17
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 disappearing metrics-probe()
counters
#243
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the first step of a refactor round that tries to decouple a few dynamic-metric-related units from the cache built around it. The end goal is to fix a lifetime issue that is related to the TLS cache version of this store. Signed-off-by: László Várady <[email protected]>
MrAnno
added a commit
to MrAnno/axosyslog
that referenced
this pull request
Aug 8, 2024
Signed-off-by: László Várady <[email protected]>
MrAnno
force-pushed
the
fix-metrics-probe-cntr-lifetime
branch
from
August 8, 2024 07:54
78b9ffe
to
9e04f46
Compare
It is no longer called a "cache", so "retrieve" may express the functionality better. Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
This is a preparation step for fixing a lifetime bug related to TLS caching. This unit will be extended with a global cache in order not to make metrics orphaned whenever an ivykis worker stops. Signed-off-by: László Várady <[email protected]>
MrAnno
added a commit
to MrAnno/axosyslog
that referenced
this pull request
Aug 8, 2024
Signed-off-by: László Várady <[email protected]>
MrAnno
force-pushed
the
fix-metrics-probe-cntr-lifetime
branch
from
August 8, 2024 09:15
9e04f46
to
4e1745c
Compare
Okay, I'm stupid :D |
To denote that this is about templating dynamic counters. Signed-off-by: László Várady <[email protected]>
It would have been better to decouple the metrics template unit from the cache, but this would have had performance implications. Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
This is required for merging the TLS-cache into a global cache to avoid making dynamic metrics orphan on thread shutdown. Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
This unit has been extended with a global cache in order not to make metrics orphaned whenever an ivykis worker stops (after 10 seconds of inactivity). The global cache requires a lock, but it is only updated on thread shutdown. The global cache is purged during reload. Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
MrAnno
force-pushed
the
fix-metrics-probe-cntr-lifetime
branch
from
August 8, 2024 09:56
4e1745c
to
10376b4
Compare
bazsi
approved these changes
Aug 12, 2024
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 looks good. Great work.
This was referenced Aug 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The TLS cache of
metrics-probe()
has been extended with a global cache in order not to make metrics orphaned whenever an ivykis worker stops (after 10 seconds of inactivity).The global cache requires a lock, but it is only updated on thread shutdown. It is purged during reload.
Refactor overview:
I've also tried to decouple metrics-template from the cache functionality, but it would have had performance implications, so I only added a comment about the coupled functionality.