Throttle our retries when attempting cross-signing reset, and give up after a time limit#6325
Conversation
5c0f500 to
c6e3451
Compare
… after a time limit
c6e3451 to
5d9c048
Compare
Hywan
left a comment
There was a problem hiding this comment.
Approving but can't we use the backoff mechanism we have in the HTTP client instead?
Merging this PR will improve performance by 98.97%
Performance Changes
Comparing |
Hmm, I'm not sure. We want to keep polling fast because at some point the user will click the button in MAS and we want to respond quickly when that happens. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6325 +/- ##
==========================================
- Coverage 89.82% 89.80% -0.02%
==========================================
Files 376 376
Lines 102591 102601 +10
Branches 102591 102601 +10
==========================================
- Hits 92152 92144 -8
- Misses 6857 6872 +15
- Partials 3582 3585 +3 ☔ View full report in Codecov by Sentry. |
Related to element-hq/element-x-android#6420
Part of element-hq/element-x-android#5075
I noticed when investigating a bug about resetting your identity when using a MAS login that we poll the server checking whether the user has given us permission with no limit on how fast we poll, and with no ability to give up if it's not working.
This change causes us to retry only twice per second, and give up after 2 minutes. These are guesses as to the right values and I am open to discussion.
CHANGELOG.mdfiles.