-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rate limiti joins per-room, accounting for joins created by other servers #13169
Conversation
d75717f
to
3f58763
Compare
but don't use it in tests
Warn about replication problem in upgrade notes
and consult it when actioning joins. Only bump rate limit if we will persist the event; otherwise we'll see it over replication
- FederatingHomeserverTestCase: keys last 10x longer I am guessing that this is the first example of a test which calls `make_signed_federation_request` after the reactor has advanced by >= 1 second until now. - Increase max_request_body_size to 4KB in tests The previous limit prevented the master from accepting some replication requests which were 1.3kB in size.
3f58763
to
121590a
Compare
@@ -1380,6 +1380,22 @@ rc_joins: | |||
burst_count: 12 | |||
``` | |||
--- | |||
### `rc_joins_per_room` |
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.
Would you mind adding info here about what release this config option will be added in?
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.
Can do.
I am going to leave it to someone more confident than me to approve this but from my very limited vantage point it makes sense. My only request would be to make sure you add something in the release notes (and maybe even the upgrade notes?) about adding a new config option, as there have been strident requests that we be very clear about what is being added to the config. |
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.
Otherwise LGTM!
The changes you asked me to look at seem great, thanks for doing that! |
Simpler, cleaner, faster, stronger.
744d4fb
to
81eb4ab
Compare
- rename the method to distinguish it from `add_hashes_and_signatures` - use it in a few other places where it makes sense
per discussion today
I have pushed a bunch of changes. I probably shouldn't have snuck in 8377172 but oh well. This is now fairly large. I am happy to split this up into smaller PRs if you would prefer. |
Tests failing because joining a room now takes one more query. |
This was a bit of a monster. Review commit-by-commit.
There are a bunch of helper commits to start which are fairly independent. [f272919] and
accf9d6 are the actual bits of logic here.
Closes #12710.