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

fix: Fix data race issue on metrics Counters and Histograms #139

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

jimmyjames
Copy link
Contributor

@jimmyjames jimmyjames commented Oct 22, 2024

Description

Fix data race issue in metrics.go caused by unlocked access to the Counters and Histograms maps.

References

Similar to fix provided in #136

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

If you haven't done so yet, we would appreciate it if you could star the OpenFGA repository. :)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.01%. Comparing base (9c2614b) to head (fed49e5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
+ Coverage   25.98%   26.01%   +0.03%     
==========================================
  Files         102      102              
  Lines       12405    12411       +6     
==========================================
+ Hits         3223     3229       +6     
  Misses       8911     8911              
  Partials      271      271              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jimmyjames jimmyjames marked this pull request as ready for review October 22, 2024 20:52
@jimmyjames jimmyjames requested a review from a team as a code owner October 22, 2024 20:52
@jimmyjames jimmyjames added this pull request to the merge queue Oct 22, 2024
Merged via the queue into main with commit d70965e Oct 22, 2024
9 checks passed
@jimmyjames jimmyjames deleted the fix/fix-metrics-data-race branch October 22, 2024 21:10
@jimmyjames jimmyjames mentioned this pull request Oct 22, 2024
4 tasks
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

Successfully merging this pull request may close these issues.

3 participants