mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 22:34:19 -05:00
Reinstate linearizer for federation_server.on_context_state_request
This commit is contained in:
parent
60f6014bb7
commit
0c280d4d99
@ -211,6 +211,12 @@ class FederationServer(FederationBase):
|
|||||||
if not in_room:
|
if not in_room:
|
||||||
raise AuthError(403, "Host not in room.")
|
raise AuthError(403, "Host not in room.")
|
||||||
|
|
||||||
|
# we grab the linearizer to protect ourselves from servers which hammer
|
||||||
|
# us. In theory we might already have the response to this query
|
||||||
|
# in the cache so we could return it without waiting for the linearizer
|
||||||
|
# - but that's non-trivial to get right, and anyway somewhat defeats
|
||||||
|
# the point of the linearizer.
|
||||||
|
with (yield self._server_linearizer.queue((origin, room_id))):
|
||||||
resp = yield self._state_resp_cache.wrap(
|
resp = yield self._state_resp_cache.wrap(
|
||||||
(room_id, event_id),
|
(room_id, event_id),
|
||||||
self._on_context_state_request_compute,
|
self._on_context_state_request_compute,
|
||||||
|
Loading…
Reference in New Issue
Block a user