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

Add context for when/why to use the long_retries option when sending Federation requests #15721

Merged
merged 4 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15721.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add context for when/why to use the `long_retries` option when sending Federation requests.
11 changes: 9 additions & 2 deletions synapse/http/matrixfederationclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,15 @@ async def _send_request(
Note that the above intervals are *in addition* to the time spent
waiting for the request to complete (up to `timeout` ms).

NB: the long retry algorithm takes over 20 minutes to complete, with
a default timeout of 60s!
NB: the long retry algorithm takes over 20 minutes to complete, with a
default timeout of 60s! It's best not to use the `long_retries` option
for something that is blocking a client so we don't make them wait for
aaaaages, whereas some things like sending transactions (server to
server) we can be a lot more lenient but its very fuzzy / hand-wavey.

In the future, we could be more intelligent about doing this sort of
thing by looking at things with the bigger picture in mind,
https://github.com/matrix-org/synapse/issues/8917

ignore_backoff: true to ignore the historical backoff data
and try the request anyway.
Expand Down