Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not auto-retry on 429 in case of too long retry delay #4995

Merged
merged 5 commits into from
Jan 20, 2022

Conversation

Florian14
Copy link
Contributor

Replace #4950

Propagate the M_LIMIT_EXCEEDED error when the provided delay is too long (exceeds 32 seconds, eg. after three failed login attempts).

@Florian14 Florian14 requested a review from bmarty January 19, 2022 16:02
@github-actions
Copy link

github-actions bot commented Jan 19, 2022

Unit Test Results

  72 files  +  4    72 suites  +4   54s ⏱️ ±0s
141 tests +  5  141 ✔️ +  5  0 💤 ±0  0 ±0 
440 runs  +20  440 ✔️ +20  0 💤 ±0  0 ±0 

Results for commit b8fa6f9. ± Comparison against base commit 491044b.

♻️ This comment has been updated with latest results.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this new version. I like it!

// 429, we can retry
delay(exception.getRetryDelay(1_000))
val retryDelay = exception.getRetryDelay(1_000)
if (retryDelay <= maxDelayBeforeRetry) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update the documentation of maxDelayBeforeRetry to inform that it also has an effect on 429 management.

@github-actions
Copy link

github-actions bot commented Jan 19, 2022

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed="21" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.account]
    passed="5" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.internal]
    passed="1" failures="1" errors="0" skipped="0"
  • [org.matrix.android.sdk.ordering]
    passed="16" failures="0" errors="0" skipped="0"
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed="2" failures="0" errors="0" skipped="0"

@Florian14 Florian14 requested a review from bmarty January 20, 2022 10:11
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@bmarty bmarty merged commit d82743e into develop Jan 20, 2022
@bmarty bmarty deleted the feature/fre/fix_retry_delay_on_429 branch January 20, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants