-
Notifications
You must be signed in to change notification settings - Fork 438
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 bug when leap array as token bucket(sample bucket is 1) #327
Conversation
Codecov Report
@@ Coverage Diff @@
## master #327 +/- ##
==========================================
- Coverage 50.91% 50.83% -0.08%
==========================================
Files 68 68
Lines 3814 3820 +6
==========================================
Hits 1942 1942
- Misses 1606 1609 +3
- Partials 266 269 +3
Continue to review full report at Codecov.
|
LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may refine the currentCounter
method of xxxLeapArray
in circuit breakers: return error directly and let callers handle it (instead of just returning nil).
ff4d3ea
to
2d11791
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…libaba#327) * If the sample count is 1 in leapArray, we guarantee `currentBucketOfTime` returns the bucket. * Also refine method signature of getting counters in circuit breaker modules.
Describe what this PR does / why we need it
Does this pull request fix one issue?
Describe how you did it
If the sample count is 1 in leapArray, we guarantee
currentBucketOfTime
returns the bucket.Describe how to verify it
Special notes for reviews