-
Notifications
You must be signed in to change notification settings - Fork 302
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
feat: Add retry mechanism to file access methods #2287
Conversation
Signed-off-by: Kevin Su <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2287 +/- ##
==========================================
+ Coverage 83.31% 83.60% +0.28%
==========================================
Files 309 311 +2
Lines 24064 23966 -98
Branches 3496 3503 +7
==========================================
- Hits 20050 20037 -13
+ Misses 3386 3298 -88
- Partials 628 631 +3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
s3fs PR. fsspec/s3fs#865 |
Signed-off-by: Kevin Su <[email protected]>
flytekit/core/data_persistence.py
Outdated
for retry in range(retries): | ||
try: | ||
if retry > 0: | ||
sleep(min(random.random() + 2 ** (retry - 1), 32)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exponential backoff + jitter is usually implemented like:
sleep(random.randint(0, min(2 ** retry, 32)))
https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ is the gold standard describing a few techniques for implementing exp. backoff + jitter.
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]> Signed-off-by: Jan Fiedler <[email protected]>
Tracking issue
NA
Why are the changes needed?
Failed to upload a file to s3
What changes were proposed in this pull request?
Catch the error
Please reduce your request rate
, and retry the request.How was this patch tested?
Remote cluster
Setup process
Screenshots
Check all the applicable boxes
Related PRs
NA
Docs link
NA