OmriSteiner opened a new issue, #350:
URL: https://github.com/apache/arrow-rs-object-store/issues/350
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
When the underlying connection is abruptly closed to due to TCP reset,
object store does not attempt to retry the request.
Here is the error I'm getting:
```
Generic {
store: "S3",
source: RetryError {
method: GET,
uri: Some(
https://s3.us-east-1.amazonaws.com/<redacted>,
),
retries: 0,
max_retries: 1000,
elapsed: 25.769196ms,
retry_timeout: 180s,
inner: Http(
HttpError {
kind: Unknown,
source: reqwest::Error {
kind: Request,
source: hyper_util::client::legacy::Error(
SendRequest,
hyper::Error(
Io,
Os {
code: 104,
kind: ConnectionReset,
message: "Connection reset by peer",
},
),
),
},
},
),
},
}
```
IIRC, connection reset by peer is basically when the other side closes the
connection using RST.
I'm running on Linux, mind you.
**To Reproduce**
<!--
Steps to reproduce the behavior:
-->
I'm not sure how to reproduce this, would probably require to write a small
HTTP server which drops the connection while serving (?).
Either that or write a unit-test for the relevant function which converts
the reqwest error to object store error. But I'm unsure whether the relevant
types can be constructed publicly like this.
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
I expect object_store to retry in this situation.
**Additional context**
<!--
Add any other context about the problem here.
-->
This happens because
[here](https://github.com/apache/arrow-rs-object-store/blob/36752c975d4f29e20b57c91f81a10872dcd48ae7/src/client/http/connection.rs#L104)
we try to downcast the reqwest error to classify it better so we can act
accordingly. However, my guess is that since the transition to hyper 1.0, the
reqwest crate started relying on `hyper_util::client::legacy::Client` and thus
the error type is `hyper_util::client::legacy::Error` rather than
`hyper::Error`.
I'm willing to contribute a PR to fix this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]