Retry loop retries 501 Not Implemented
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- networking
Research direction
The default retry predicate is in src/client/retry.rs in RetryableRequest, where any server-error status is retried. Find that check and see how it treats 501 Not Implemented compared with other 5xx codes. Done means a 501 response is returned to the caller on the first attempt without retries, while other 5xx responses are still retried. Check the existing retry tests to confirm nothing else changes.
Written by the indexing model from the issue text.
Description
Describe the bug
RetryableRequest retries any 5xx response (status.is_server_error(), src/client/retry.rs around line 428 on main, 406-411 in 0.14.2). That includes 501 Not Implemented, which RFC 9110 section 15.6.2 defines as "the server does not support the functionality required to fulfill the request": the same request will get the same answer. With the default RetryConfig the caller waits through 10 retries with backoff (seconds typically, up to retry_timeout) before getting the error it could have had at once.
To Reproduce
A server or CDN that does not implement a request feature answers 501. For example, Fastly answers a suffix range (Range: bytes=-n) with 501. Against an S3-compatible endpoint that does this, store.get_opts(path, GetOptions { range: Some(GetRange::Suffix(n)), .. }) sends the request 11 times and then fails with ... after 10 retries, max_retries: 10, retry_timeout: 180s ... 501 Not Implemented.
Expected behavior
A 501 is returned to the caller on the first response, without retrying, so the caller can fall back (for a suffix range: ask for a bounded range instead).
Additional context
- A one-line change in the default predicate would do it: retry
is_server_error() && status != StatusCode::NOT_IMPLEMENTED. - #840 / #841 would let a caller override the whole status predicate; this is narrower: only the default's handling of 501.
- Workaround today: wrap the
HttpConnectorand map a 501 response to anHttpErrorof kindUnknown, which the retry loop does not retry.
- Dominant language
- Rust
- Stars
- 339
- Forks
- 240
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-rs-object-store
-
`hyper::Error::is_incomplete_message()` classified as `HttpErrorKind::Request`, retrying non idempotent `PutMode::Create`Possibly taken @hcrosse claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
apache/arrow-rs-object-store#912 ·
Maintainers usually reply within 2 days
-
Default `ObjectStore::get_ranges` panics when a range past the end of the object is coalesced with an earlier rangePossibly taken @0z5a claimed this 9 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/arrow-rs-object-store#905 ·
Maintainers usually reply within 2 days
-
AWS: list requests are signed without ClientOptions default headers (sent unsigned, S3 403 HeadersNotSigned)Possibly taken @filippoGRiva claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/arrow-rs-object-store#877 ·
Maintainers usually reply within 2 days
-
List requests do not map HTTP status codes to error variants, so 403 and 404 both become `Error::Generic`May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 Half a day Newbie friendliness 82/100
apache/arrow-rs-object-store#851 · 2 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
Errors on 200 Response for entire-object range requestMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-rs-object-store#806 · 2 comments ·
Maintainers usually reply within 2 days
All issues in apache/arrow-rs-object-store
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kashsuks/Pinel#172 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
test_a_503_raises_unavailable_error fails on macOS about one run in sixPossibly taken @naman-modi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug ui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
userFRM/egui-charts#4168 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day