do not backoff remote device key queries when a request fails due to backoff

The previous logic would increment the backoff counter both when a
request actually fails and when we do not make a request because the
server was already in backoff. This lead to a positive feedback loop
where every request made while a server is in backoff increases the
backoff delay, making it impossible to recover from backoff unless the
entire backoff delay elapses with zero requests.
This commit is contained in:
Olivia Lee 2024-12-01 16:12:11 -08:00
parent 4ee8312068
commit ba72616672
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
2 changed files with 6 additions and 2 deletions

View file

@ -209,6 +209,10 @@ This will be the first release of Grapevine since it was forked from Conduit
after a successful request, causing an increasing rate of key query failures
over time until a server restart.
([!149](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/149))
23. Fix bug where remote key queries that were skipped because the target server
was in backoff would increment the backoff delay further, leading to a
positive feedback loop.
([!149](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/149))
### Added