Skip to content
Snippets Groups Projects

Fix race in helpers/prometheus/log_hook.go: Fire() method

Merged Tomasz Maczukin requested to merge fix/race-on-error-metric-collector into master
All threads resolved!

What does this MR do?

Fixes races that can occur with concurrent calls to Fire() in helpers/prometheus/log_hook.go.

Why was this MR needed?

https://gitlab.com/gitlab-com/infrastructure/issues/1079#note_22260206

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 800aed05 - Replace mutex with sync.atomic usage

    Compare with previous version

  • Author Maintainer

    The test seems to be quite reliable. 100 repeats without the fix fails each time, 100 repeats with the fix succeeds each time.

  • assigned to @ayufan

  • added 1 commit

    • cfb6dbc2 - Replace mutex with sync.atomic usage

    Compare with previous version

  • added 1 commit

    • b06bfc5b - Replace mutex with sync.atomic usage

    Compare with previous version

  • Kamil Trzciński
  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • added 1 commit

    • e27af8a7 - Replace mutex with sync.atomic usage

    Compare with previous version

  • Author Maintainer

    @ayufan Updated!

  • assigned to @ayufan

  • Kamil Trzciński enabled an automatic merge when the pipeline for e27af8a7 succeeds

    enabled an automatic merge when the pipeline for e27af8a7 succeeds

  • mentioned in commit b4c159dc

  • mentioned in commit 8e829463

  • Please register or sign in to reply
    Loading