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

Add retry on S3 SlowDown exceptions #958

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import traceback

from minio.error import MinioException, S3Error
from retry import retry


class ObjectStoreError(Exception):
Expand Down Expand Up @@ -57,6 +58,9 @@ def __init__(self, url=None, username=None, password=None, use_https=False):
'MINIO_SECRET_KEY'],
secure=secure_connection)

@retry(tries=3, delay=3,
ponyisi marked this conversation as resolved.
Show resolved Hide resolved
backoff=4,
jitter=(1, 3), logger=logging.getLogger(__name__))
def upload_file(self, bucket, object_name, path):
try:
result = self.minio_client.fput_object(bucket_name=bucket,
Expand Down