apache / apache/arrow-rs-object-store
S3 suffix-range GET on a zero-byte object returns private NotPartial wrapped as Error::Generic
- Dominant language
- Rust
- Stars
- 322
- Forks
- 212
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 10
Description
**Describe the bug**
Requesting a suffix range from an existing zero-byte S3 object fails with `Error::Generic(GetResultError::NotPartial)`. S3 returns a 200 for the suffix-range GET when the object is 0 bytes, but object_store expects a 206.
**To Reproduce**
```rust
let options =
GetOptions::new().with_range(Some(GetRange::Suffix(512 * 1024)));
let result = store.get_opts(&path, options).await;
```
For a zero-byte object, AWS S3 responds with:
```
HTTP/1.1 200 OK
Content-Length: 0
```
**Expected behavior**
Either the call should return success, or fail with some error with a specific type that the caller can use to discriminate and handle this case specifically (e.g. by falling back to a HEAD).
Contributor guide
Research direction
Start by reproducing get_opts with GetOptions and GetRange::Suffix against an existing zero-byte S3 object, then trace how the 200 response becomes Error::Generic(GetResultError::NotPartial). Confirm the intended behavior with maintainers, add coverage for this response, and ensure callers can distinguish or successfully handle the zero-byte case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100