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 rate limiter #4560

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Fix rate limiter #4560

merged 1 commit into from
Mar 25, 2024

Conversation

sunaurus
Copy link
Collaborator

@sunaurus sunaurus commented Mar 21, 2024

Currently, rate limiters are not working due to a bug in remove_full_buckets which causes all buckets to be removed every time it is called. This PR fixes the bug.

Includes a few additional tests for this particular case as well.

@sunaurus
Copy link
Collaborator Author

(Tested on lemm.ee, my rate limits are functional again after applying this)

Copy link
Collaborator

@dullbananas dullbananas left a comment

Choose a reason for hiding this comment

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

What an embarrassing week. A few days ago I realized that the way I acted on a crush is wrong, and now I'm realizing that my rate limiter implementation is wrong and caused rate limits on Lemmy servers to not work for 5 months.

@sunaurus
Copy link
Collaborator Author

Don't be too hard on yourself 😄 It's a really easy mistake to make & quite hard to spot during testing

@uniquePWD
Copy link

What an embarrassing week. A few days ago I realized that the way I acted on a crush is wrong, and now I'm realizing that my rate limiter implementation is wrong and caused rate limits on Lemmy servers to not work for 5 months.

Sending hugs

@Nutomic Nutomic enabled auto-merge (squash) March 25, 2024 11:29
@Nutomic Nutomic merged commit 99d01e1 into LemmyNet:main Mar 25, 2024
1 check passed
@dullbananas dullbananas mentioned this pull request Apr 4, 2024
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

4 participants