You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if we try to register the same metric to registry, we get an error and there is no way to fetch the metric from registry. This make it impossible to reuse the metric. Of course we can get before register but in concurrent scenario it can break.
I haven't looked very deep into the code, but the idea seems to be returning the already registerd metric as a member of Error::AlreadyReg. Also we need to update those macros to ensure that every time we can the macro with legal input, it should return a metric handle.
The text was updated successfully, but these errors were encountered:
sunng87
changed the title
Consider allowing duplicate registration and returning the metric on Error::AlreadyReg
Consider returning the metric on duplicated registration, Error::AlreadyReg
Jul 4, 2024
Thanks for the report. If I'm understanding correctly, this request is an exact duplicate of #495. Can we close this duplicate and keep the discussion there? Or is there some important detail that is different here?
This is similar request to #495
Currently, if we try to register the same metric to registry, we get an error and there is no way to fetch the metric from registry. This make it impossible to reuse the metric. Of course we can get before register but in concurrent scenario it can break.
I haven't looked very deep into the code, but the idea seems to be returning the already registerd metric as a member of
Error::AlreadyReg
. Also we need to update those macros to ensure that every time we can the macro with legal input, it should return a metric handle.Context: we hit this issue with opendal apache/opendal#4854 in greptimedb GreptimeTeam/greptimedb#2861
Let me know what do you think. Thank you!
The text was updated successfully, but these errors were encountered: