lemmy/crates
dullbananas a14657d124
Refactor rate limiter and improve rate limit bucket cleanup (#3937)
* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Shrink `RateLimitBucket`

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* rerun ci

* Update rate_limiter.rs

* Undo changes to  fields

* Manually undo changes to RateLimitBucket fields

* fmt

* Bucket cleanup loop in rate_limit/mod.rs

* Remove rate limit bucket cleanup from scheduled_tasks.rs

* Remove ;

* Remove UNINITIALIZED_TOKEN_AMOUNT

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* stuff

* MapLevel trait

* fix merge

* Prevent negative numbers in buckets

* Clean up MapLevel::check

* MapLevel::remove_full_buckets

* stuff

* Use remove_full_buckets to avoid allocations

* stuff

* remove tx

* Remove RateLimitConfig

* Rename settings_updated_channel to rate_limit_cell

* Remove global rate limit cell

* impl Default for RateLimitCell

* bucket_configs doc comment to explain EnumMap

* improve test_rate_limiter

* rename default to with_test_config

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
2023-10-19 15:31:51 +02:00
..
api Handle invalid ban expires values (fixes #4045) (#4046) 2023-10-17 13:25:35 -04:00
api_common Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
api_crud Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
apub Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
db_schema Handle invalid ban expires values (fixes #4045) (#4046) 2023-10-17 13:25:35 -04:00
db_views List distinguished comments first (fixes #3843) (#4050) 2023-10-17 13:22:50 -04:00
db_views_actor Cleanup public api (#4047) 2023-10-16 19:37:28 -04:00
db_views_moderator chore: Run rust format 2023-09-22 21:39:03 -04:00
federate chore: Run rust format 2023-09-22 21:39:03 -04:00
routes Cleanup checks for community actions (fixes #2858, fixes #2868) (#4028) 2023-10-13 09:48:18 -04:00
utils Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00