You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
With default rate limiting values, we used to be able to create at least 3 rooms in one go. The new Space screen in Element Web depends on this (element-hq/element-web#23620) and breaks if any of those room creations are rate limited, as they are now (v1.70.0).
The following test case demonstrates this:
fromhttpimportHTTPStatusfromsynapse.rest.clientimportroomfromtests.unittestimportHomeserverTestCase, override_configclassBisectCase(HomeserverTestCase):
servlets= [room.register_servlets]
hijack_auth=Trueuser_id="@sid1:test"@override_config({"rc_message": {"per_second": 0.2, "burst_count": 10}, })deftest_can_create_3_rooms(self):
""" Should be able to create 3 rooms in a row (e.g. rooms in a space) without hitting rate limits. """for_inrange(3):
channel=self.make_request(
"POST",
"/createRoom",
{},
)
self.assertEqual(channel.code, HTTPStatus.OK, channel.json_body)
Bisecting, the following commit is what made the above fail because of the rate limit: 8ab16a9 'Persist CreateRoom events to DB in a batch (#13800)' in v1.69.0.
We should try to revert rate limiting to behave the same as before or closely enough that this basic use case is not broken.