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

[BUG] Add retries for write timeout errors #2508

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion daft/table/table_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ def _write_tabular_arrow_table(
NUM_TRIES = 3
JITTER_MS = 2_500
MAX_BACKOFF_MS = 20_000
RETRY_ERRORS = ("InvalidPart", "curlCode: 28, Timeout was reached")

for attempt in range(NUM_TRIES):
try:
Expand All @@ -830,7 +831,7 @@ def _write_tabular_arrow_table(
)
break
except OSError as e:
if "InvalidPart" not in str(e):
if all(err_str not in str(e) for err_str in RETRY_ERRORS):
raise

if attempt == NUM_TRIES - 1:
Expand Down
Loading