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

Improve robustness of S3 reading #552

Merged
merged 11 commits into from
Jan 15, 2021
Merged

Improve robustness of S3 reading #552

merged 11 commits into from
Jan 15, 2021

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Oct 25, 2020

Fix #551

The previous implementation did a single retry without sleeping.

The proposed approach is to perform multiple retries with incremental backoff (sleep longer after consecutive failures).

Copy link
Owner

@piskvorky piskvorky left a comment

Choose a reason for hiding this comment

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

boto3 has its own retry functionality:
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html

Why not use that?

smart_open/s3.py Show resolved Hide resolved
smart_open/s3.py Outdated Show resolved Hide resolved
smart_open/s3.py Outdated Show resolved Hide resolved
@piskvorky piskvorky changed the title implement incremental backoff for s3 reads [WIP] Implement incremental backoff for s3 reads Oct 25, 2020
@mpenkov mpenkov changed the title [WIP] Implement incremental backoff for s3 reads Implement incremental backoff for s3 reads Jan 8, 2021
@mpenkov
Copy link
Collaborator Author

mpenkov commented Jan 8, 2021

This is ready for another round @piskvorky

@mpenkov mpenkov changed the title Implement incremental backoff for s3 reads Improve robustness of S3 reading Jan 9, 2021
@mpenkov mpenkov merged commit 4f301d6 into develop Jan 15, 2021
@mpenkov mpenkov deleted the backoff branch January 15, 2021 06:49
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.

smart_open does not recover from connection errors when reading from S3
2 participants