Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

bugfix: native histogram: data race in addExemplar #1609

Closed
wants to merge 4 commits into from

Commits on Aug 31, 2024

  1. native histogram: use exemplars in concurrency test

    Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
    krajorama committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    8fb77a3 View commit details
    Browse the repository at this point in the history
  2. Use an atomic variable to check if exemplars are disabled

    Instead of  checking non thread safe slice capacity
    
    Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
    krajorama committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    5123705 View commit details
    Browse the repository at this point in the history
  3. fix: native histogram: Simplify and fix addExemplar

    mdIdx was redundant when len(exemplars)>1, so got rid of it, rIdx
    is enough.
    
    Don't compare timestamp of incoming exemplar to timestamp of
    minimal distance exemplar. Most of the time the incoming exemplar
    will be newer. And if not, the previous code just replaced an
    exemplar one index after the minimal distance exemplar. Which had
    an index out of range bug, plus is essentially random.
    
    Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
    
    # Conflicts:
    #	prometheus/histogram.go
    krajorama committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    e9cbc7b View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Do not use atomics

    Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
    krajorama committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    6c6aa53 View commit details
    Browse the repository at this point in the history