Skip to content
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

Locks missing on Registry's Each and GetAll functions => concurrent reads/writes in registry map #282

Open
jo-me opened this issue Mar 6, 2021 · 0 comments

Comments

@jo-me
Copy link

jo-me commented Mar 6, 2021

Hi,

several times I've seen exceptions that there are concurrent reads and writes on a map. The map in question is registry.metrics.
This apparently happens in the case that values are iterated in the map while new ones are added by GetOrRegister() or Register().

I assume this is due to the fact that Get()/Register()/GetOrRegister() functions all use locking while Each() and GetAll() don't.

Could this be added so that the map access can happen thread-safe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant