Skip to content

fix(circuit breaker): protect access to lastFailureAt by atomic operations to avoid race conditions #1019

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

Open
wants to merge 3 commits into
base: v3
Choose a base branch
from

Conversation

liuzengh
Copy link
Contributor

@liuzengh liuzengh commented May 11, 2025

  • Remove unnecessary nil checks for the receiver. it is the caller's responsibility to ensure that circuit breaker is not nil.

…rations to avoid race conditions

And remove unnecessary nil checks for the receiver. it is the caller's responsibility to ensure that  circuit breaker  is not nil.
Copy link

codecov bot commented May 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.82%. Comparing base (66256ef) to head (90c5a7d).

Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #1019      +/-   ##
==========================================
- Coverage   99.82%   99.82%   -0.01%     
==========================================
  Files          18       18              
  Lines        3919     3915       -4     
==========================================
- Hits         3912     3908       -4     
  Misses          5        5              
  Partials        2        2              
Flag Coverage Δ
unittests 99.82% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant