-
Notifications
You must be signed in to change notification settings - Fork 230
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
replace safe_set with set #147
Conversation
Thank you for proposing this. In general, I believe that the library should maintain data integrity and never lose metric values. If shdict gets full and lru eviction kicks in, it should be treated as an error:
What I think would be a good way forward is to proceed with replacing |
I agree. Let me have a try. |
@knyar Please review my commits and approve the github workflow, thanks. |
Thank you! I am going to merge this into a separate branch to make a few follow-up adjustments before merging this to |
- replace safe_set with set cherry pick of knyar/nginx-lua-prometheus@5b6a209 See knyar/nginx-lua-prometheus#147 - improve LRU eviction error message - improve histogram consistency cherry-pick of knyar/nginx-lua-prometheus@0d790d0
- replace safe_set with set cherry pick of knyar/nginx-lua-prometheus@5b6a209 See knyar/nginx-lua-prometheus#147 - improve LRU eviction error message - improve histogram consistency cherry-pick of knyar/nginx-lua-prometheus@0d790d0
When the number of metrics increase, especially due to label value changes or add/remove labels on reload, it's likely to use up the shdict, when mostly we want to remove the old items in shdict making use of the lru cache mechanism of shdict. The old items are supposed to be ignored.
In fact, even we insist
safe_set
, theinc
we used in other places of codes may also purge old items. So why not make them consistent?