Skip to content

Fix for stuck ratelimit buckets #10160

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 1 commit into
base: master
Choose a base branch
from

Conversation

mikeshardmind
Copy link
Contributor

@mikeshardmind mikeshardmind commented Apr 5, 2025

Summary

This might not be the best way to handle this, and this still needs testing,

A more intrusive fix here would be to swap this to a pair of semaphore and timed lockout, which I'm trying to avoid having to redesign the ratelimit mechanism.

see thread: https://discord.com/channels/336642139381301249/1355766330996949034

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@ju
Copy link

ju commented Apr 5, 2025

For record keeping: the fix solved my particular edge case issue.

@mikeshardmind mikeshardmind marked this pull request as ready for review April 5, 2025 23:51
@mikeshardmind
Copy link
Contributor Author

Tested, working as intended without causing an issue of waking too soon and not respecting ratelimits, including on longer ratelimits like channel edit.

root issue this fixes is that without this, it's possible for a request to get stuck with nothing to trigger waking it.

@mikeshardmind mikeshardmind changed the title [Draft] fix for stuck ratelimit buckets Fix for stuck ratelimit buckets Apr 6, 2025
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.

2 participants