-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(metrics/family): 🍫 add Family::get_or_create_owned()
#244
feat(metrics/family): 🍫 add Family::get_or_create_owned()
#244
Conversation
13dbb03
to
fb14089
Compare
fb14089
to
708c1ec
Compare
i've rebased this commit to address merge conflicts, and added information to the changelog. let me know if there is anything else that needs to be done. i am keen on a release that addresses the deadlocks reported in #231. |
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.
Thank you for working on this.
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.
Two more comments. Otherwise looks good to me.
Agreed, that this is not the ideal solution, but in my eyes a good compromise, given that it is not a breaking change. Long term, we can redesign this interface in a breaking release.
prometheus#244 (comment) Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
fixes prometheus#231. this introduces a new method to `Family<S, M, C>` to help alleviate the risk of deadlocks when accessing multiple series within a given metrics family. this returns a plain `M`, rather than the `MappedRwLockReadGuard<M>` RAII guard returned by `get_or_create()`. a test case is introduced in this commit to demonstrate that structures accessing multiple series within a single expression will not accidentally create a deadlock. Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
this linked to the wrong method. this is now fixed. Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
prometheus#244 (comment) Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
9e34bd3
to
4f11006
Compare
Signed-off-by: Max Inden <mail@max-inden.de>
Family::get_or_create_clone()
Family::get_or_create_owned()
Signed-off-by: Max Inden <mail@max-inden.de>
fixes #231.
this introduces a new method to
Family<S, M, C>
to help alleviate the risk of deadlocks when accessing multiple series within a given metrics family.this returns a plain
M
, rather than theMappedRwLockReadGuard<M>
RAII guard returned byget_or_create()
.a test case is introduced in this commit to demonstrate that structures accessing multiple series within a single expression will not accidentally create a deadlock.