Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Bump the client-side timeout for /state (#14912)
Browse files Browse the repository at this point in the history
* Bump the client-side timeout for /state

to allow faster joins resyncs the chance to complete for large rooms.
We have seen this fair poorly (~90s for Matrix HQ's /state) in testing,
causing the resync to advance to another HS who hasn't seen our join yet.

* Changelog

* Milliseconds!!!!
  • Loading branch information
David Robertson committed Jan 25, 2023
1 parent a63d4cc commit 8e37ece
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/14912.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Faster joins: allow the resync process more time to fetch `/state` ids.
4 changes: 4 additions & 0 deletions synapse/federation/transport/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ async def get_room_state(
destination,
path=path,
args={"event_id": event_id},
# This can take a looooooong time for large rooms. Give this a generous
# timeout of 10 minutes to avoid the partial state resync timing out early
# and trying a bunch of servers who haven't seen our join yet.
timeout=600_000,
parser=_StateParser(room_version),
)

Expand Down

0 comments on commit 8e37ece

Please sign in to comment.