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

Restore int64 based atomic rate limiter #94

Merged
merged 1 commit into from
Jul 2, 2022

Conversation

storozhukBM
Copy link
Contributor

This limiter was introduced and merged in the following PR #85
Later @twelsh-aw found an issue with this implementation #90
So @rabbbit reverted this change in #91

Our tests did not detect this issue, so we have a separate PR #93 that enhances our tests approach to detect potential errors better.
With this PR, we want to restore the int64-based atomic rate limiter implementation as a non-default rate limiter and then check that #93 will detect the bug.
Right after it, I'll open a subsequent PR to fix this bug.

@storozhukBM storozhukBM marked this pull request as ready for review June 29, 2022 20:27
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #94 (e3d4637) into main (029273d) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #94   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         4    +1     
  Lines           70        97   +27     
=========================================
+ Hits            70        97   +27     
Impacted Files Coverage Δ
limiter_atomic_int64.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 029273d...e3d4637. Read the comment docs.

@@ -11,6 +11,7 @@ require (

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/storozhukBM/benchart v1.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks like we missed it earlier somewhere.

@rabbbit rabbbit merged commit 783ade2 into uber-go:main Jul 2, 2022
@rabbbit
Copy link
Contributor

rabbbit commented Jul 2, 2022

Thanks!

storozhukBM added a commit to storozhukBM/ratelimit that referenced this pull request Jul 2, 2022
This limiter was introduced and merged in the following PR uber-go#85
Later @twelsh-aw found an issue with this implementation uber-go#90
So @rabbbit reverted this change in uber-go#91

Our tests did not detect this issue, so we have a separate PR uber-go#93 that enhances our tests approach to detect potential errors better.
With this PR, we want to restore the int64-based atomic rate limiter implementation as a non-default rate limiter and then check that uber-go#93 will detect the bug.
Right after it, we'll open a subsequent PR to fix this bug.
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.

None yet

2 participants