Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

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

@jo-me

Description

@jo-me

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions