Skip to content

Handle ChunkedEncodingError as a retryable transfer failure - #2173

Open
magnusrwn wants to merge 1 commit into
elastic:masterfrom
magnusrwn:2172
Open

Handle ChunkedEncodingError as a retryable transfer failure#2173
magnusrwn wants to merge 1 commit into
elastic:masterfrom
magnusrwn:2172

Conversation

@magnusrwn

Copy link
Copy Markdown

Fixes #2172.

Summary

requests.exceptions.ChunkedEncodingError raised while streaming
HTTP response chunks was falling through to Rally's fatal generic
exception path. That caused the whole transfer to abort even when partial progress
had already been recorded.

This change treats ChunkedEncodingError like Rally's other
transient HTTP read failures in HTTPAdapter.get(), so interrupted
range downloads stay on the retryable path and remaining bytes can be
retried.

Testing

  • Added coverage in tests/storage/http_test.py to verify
    ChunkedEncodingError is translated to TimeoutError
  • Added coverage in tests/storage/transfer_test.py to verify partial
    progress is preserved and remaining bytes stay in todo
  • Ran make lint test

Treat requests ChunkedEncodingError like other transient read-side HTTP failures in HTTPAdapter.get. This keeps interrupted range downloads on the retryable path instead of the fatal generic exception path, allowing partial progress to be preserved and remaining bytes to be retried.
@magnusrwn
magnusrwn requested a review from a team as a code owner August 14, 2026 12:34
@magnusrwn
magnusrwn requested review from gbanasiak and stevereads-elastic and removed request for a team August 14, 2026 12:34
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.

Transfer manager chunk iteration not reliable

1 participant