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

Update backoff strategy #2026

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Update backoff strategy #2026

merged 1 commit into from
Feb 15, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Feb 12, 2024

Instead of only 504 by default. Those might be transient errors happening when downloading or uploading files. Let's retry when that happens.

Related to huggingface/datasets#6577 (comment) (cc @sanchit-gandhi) which most likely happened due to the outage on Saturday (so a retry wouldn't have helped) but I still reviewed the process as we were currently having different retry mechanism spread in the codebase. (+it's not the first time I've seen this kind of feedback so let's "fix it" once and for all).

EDIT: Retry on any 5xx on upload. Retry on any 5xx on download except 500. (see below)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (464a34f) 82.40% compared to head (283d9b6) 82.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2026      +/-   ##
==========================================
+ Coverage   82.40%   82.41%   +0.01%     
==========================================
  Files          66       66              
  Lines        8222     8222              
==========================================
+ Hits         6775     6776       +1     
+ Misses       1447     1446       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

not sure about retrying on 500 (cc @XciD @coyotte508 WDYT?) but the other ones look good to me

@Wauplin
Copy link
Contributor Author

Wauplin commented Feb 12, 2024

We are already retrying on 500 when uploading to S3 as we already noticed transient HTTP 500 there.

@julien-c
Copy link
Member

yes I meant 500 from the hub

@XciD
Copy link
Member

XciD commented Feb 12, 2024

not sure about retrying on 500 (cc @XciD @coyotte508 WDYT?) but the other ones look good to me
Yes, agree. Could create unnecessar load on outage

@Wauplin Wauplin force-pushed the http-backoff-retry-on-any-5xx branch from 5749ce1 to 283d9b6 Compare February 12, 2024 12:36
@Wauplin Wauplin changed the title Retry on 500, 502, 503 and 504 in http_backoff Retry on 500, 502, 503 and 504 in http_backoff to S3 Feb 12, 2024
@Wauplin
Copy link
Contributor Author

Wauplin commented Feb 12, 2024

I've updated the PR (only changing upload retry).

@Wauplin Wauplin changed the title Retry on 500, 502, 503 and 504 in http_backoff to S3 Update backoff strategy Feb 12, 2024
@Wauplin Wauplin merged commit c524a86 into main Feb 15, 2024
16 checks passed
@Wauplin Wauplin deleted the http-backoff-retry-on-any-5xx branch February 15, 2024 09:24
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.

4 participants