Skip to content

[oss] Fix OSS retry strategy skipping throttling and 5xx errors with unparsable bodies - #10438

Merged
JingsongLi merged 2 commits into
apache:masterfrom
sundapeng:oss-retry-invalid-response
Oct 8, 2026
Merged

JingsongLi merged 2 commits into
apache:masterfrom
sundapeng:oss-retry-invalid-response

Conversation

@sundapeng

Copy link
Copy Markdown
Member

Purpose

When the OSS SDK cannot parse the error body of a 429/5xx response, such as 503 QpsLimitExceeded, it reports the error as InvalidResponse. OSSRetryStrategy treats InvalidResponse as non-retryable before it looks at the status, so a throttled request fails on its first attempt. Reads take the worst of it: hadoop-aliyun turns the failed GET into a null stream, its read-ahead task does not retry that, and the read fails with IOException: Null IO stream.

OSSRetryStrategy now decides by the HTTP status alone, so 429/5xx responses are retried even when their body cannot be parsed. A 4xx response is still not retried.

Tests

OSSRetryStrategyTest: 1 new case against a fake OSS endpoint and 1 updated case; 36 tests in paimon-oss-impl passed.

…t be parsed

When the OSS SDK cannot parse the error body of a 429/5xx response, it
reports the error as InvalidResponse. OSSRetryStrategy refused to retry
InvalidResponse before looking at the status, so a throttled request
failed on its first attempt. For reads, hadoop-aliyun turns that failure
into a null stream and the read fails with "Null IO stream".

Decide by the HTTP status alone, so 429/5xx responses are retried even
when their body cannot be parsed, while 4xx responses are still not
retried.
@sundapeng sundapeng changed the title [fs] Fix OSS requests failing on throttling when the error body cannot be parsed [fs] Fix OSS retry strategy skipping throttling and 5xx errors with unparsable bodies Oct 8, 2026
@sundapeng sundapeng changed the title [fs] Fix OSS retry strategy skipping throttling and 5xx errors with unparsable bodies [oss] Fix OSS retry strategy skipping throttling and 5xx errors with unparsable bodies Oct 8, 2026
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 61c8956 into apache:master Oct 8, 2026
XiaoHongbo-Hope pushed a commit that referenced this pull request Oct 8, 2026
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.

2 participants