Fix disappearing metrics-probe() counters#243
Merged
MrAnno merged 11 commits intoaxoflow:mainfrom Aug 13, 2024
Merged
Conversation
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]>
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]>
9e04f46 to
4e1745c
Compare
Contributor
Author
|
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]>
4e1745c to
10376b4
Compare
This was referenced Aug 27, 2024
HofiOne
pushed a commit
to HofiOne/axosyslog
that referenced
this pull request
Mar 13, 2025
Signed-off-by: László Várady <[email protected]> Signed-off-by: Hofi <[email protected]>
This file contains hidden or 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
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.