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

Merge release-v0.18 back into master #104

Merged
merged 4 commits into from Oct 14, 2022

Commits on Oct 14, 2022

  1. metrics/family: Fix race condition in Family::get_or_create

    The method should not overwrite an existing key after it obtains the write lock.
    
    Consider the following scenario with `Family<LabelSet, Gauge>` used by threads A and B:
    
    1. A and B both call `family.get_or_insert(&label_set)`
    2. A and B both acquire read lock and finds no key
    3. A gets write lock and inserts a new gauge with value 0
    4. A increments returned gauge to 1
    5. B gets write lock and inserts a new gauge with value 0
    6. B increments returned gauge to 1
    7. A decrements gauge back to 0
    8. B decrements gauge which now overflows to `u64::MAX`
    
    Signed-off-by: Anthony Ramine <nox@nox.paris>
    nox authored and mxinden committed Oct 14, 2022
    Copy the full SHA
    8494288 View commit details
    Browse the repository at this point in the history
  2. CHANGELOG: Prepare v0.18.1

    Signed-off-by: Max Inden <mail@max-inden.de>
    mxinden committed Oct 14, 2022
    Copy the full SHA
    ffd3c3e View commit details
    Browse the repository at this point in the history
  3. Merge pull request prometheus#103 from mxinden/release-v0.18

    *: Prepare v0.18.1
    mxinden committed Oct 14, 2022
    Copy the full SHA
    6597abc View commit details
    Browse the repository at this point in the history
  4. Merge branch 'release-v0.18' into release-v0.18-to-master

    Signed-off-by: Max Inden <mail@max-inden.de>
    mxinden committed Oct 14, 2022
    Copy the full SHA
    d346956 View commit details
    Browse the repository at this point in the history