apache / apache/arrow-rs-object-store
Add explicit `UnableToConnect` error type
- Dominant language
- Rust
- Stars
- 322
- Forks
- 212
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 10
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
I have a cache implementation that stores cached files on an S3 instance when users request some data. I also have a built-in integrity check for the cache making sure that all the files listed in the caches database are actually present and accessible. I now ran into an issue where my integrity check returned all cached entities as "corrupted" because none of the files were accessible. The culprit here was that the S3 instance was not reachable because of some other reason, but not that the files weren't there.
**Describe the solution you'd like**
In the situation described above I would like to distinguish between "we can connect to the S3 instance, but the file is not there" vs "we cannot connect to the S3 instance". This extra bit of information would be really helpful.
**Describe alternatives you've considered**
I thought about digging into the generic error type that is currently returned and maybe matching on a specific error message or downcast to a certain error type, but that might be unstable if the message or the exact type change in the future. I think a dedicated `UnableToConnect` type or something similar would be a cleaner solution.
I have only looked briefly into the codebase, but I might be able to help with the implementation of this if desired.
Contributor guide
Research direction
The issue names no files or tests. Start by locating the generic error returned by the cache integrity check and tracing the S3 object-access path; identify where connection failures are converted into errors. Done means callers can distinguish an unreachable S3 service from a missing cached file without matching error text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100