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

This commit is contained in:
Eric Eastwood 2023-06-06 16:25:03 -05:00 committed by GitHub
parent 6ee96e9366
commit 33c3550887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

1
changelog.d/15721.misc Normal file
View File

@ -0,0 +1 @@
Add context for when/why to use the `long_retries` option when sending Federation requests.

View File

@ -499,8 +499,15 @@ class MatrixFederationHttpClient:
Note that the above intervals are *in addition* to the time spent Note that the above intervals are *in addition* to the time spent
waiting for the request to complete (up to `timeout` ms). waiting for the request to complete (up to `timeout` ms).
NB: the long retry algorithm takes over 20 minutes to complete, with NB: the long retry algorithm takes over 20 minutes to complete, with a
a default timeout of 60s! 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 ignore_backoff: true to ignore the historical backoff data
and try the request anyway. and try the request anyway.