This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Performance improvements and refactor of Ratelimiter #7595
Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
4f715be
Refactor and comment ratelimiting. Set limits in constructor
anoadragon453 0e6ee7c
Ratelimiters are instantiated by the HomeServer class
anoadragon453 82eac22
Modify servlets to pull Ratelimiters from HomeServer class
anoadragon453 a0ef594
Update unittests
anoadragon453 6a07c2d
lint
anoadragon453 c322ba0
changelog
anoadragon453 f6203a6
Make rate_hz and burst_count overridable per-request
anoadragon453 1f6156b
Set clock with constructor, store rate_hz per key again
anoadragon453 c236806
Instantiate Ratelimiters in respective classes
anoadragon453 470de6e
Use patch for the Ratelimiter in some tests. Set using config in others
anoadragon453 515a186
Update copyright header
anoadragon453 87ab836
Remove resolved question
anoadragon453 56c52a5
lint
anoadragon453 2d7e087
lint, mypy
anoadragon453 a566b46
Remove unittest.DEBUG statement
anoadragon453 41c7288
Update changelog.d/7595.misc
anoadragon453 58d4919
Remove erroneous print statement
anoadragon453 aa1f4c3
Merge branch 'anoa/ratelimit_config_perf' of github.com:matrix-org/sy…
anoadragon453 39b484b
Move update after optional method arguments
anoadragon453 d727bed
Make it obvious that time_now_s is just for testing
anoadragon453 9f76a8d
Update ratelimiter calling methods and tests
anoadragon453 8867900
No need to re-check for None in can_do_action
anoadragon453 ef7383f
time_now_s is used in ratelimit
anoadragon453 189c01b
Comment changes revolving around time_allowed
anoadragon453 4a88edb
Fix missed call to self.rate_hz
anoadragon453 14a0af5
Test Ratelimiter ratelimit method and param overrides
anoadragon453 c145c81
Back out some changes.
clokep 12b4d47
Do not specify ratelimiters in tests when unnecessary.
clokep d84d779
Update timestamp comment
anoadragon453 45a7791
Clean up Exception raising assertion
anoadragon453 3899589
Clean up and split out tests
anoadragon453 08c5114
Remove _ = style
anoadragon453 9beee5f
Merge branch 'anoa/ratelimit_config_perf' of github.com:matrix-org/sy…
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note: I'm tempted to resolve this, but I don't want to change the behaviour of Ratelimiter in this PR any more.
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.
I agree that this sounds like a follow-up!