-
Notifications
You must be signed in to change notification settings - Fork 30
object store: retry / recover after partially reading a streaming response ( fix timeout errors / error decoding response body
)
#15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
error decoding response body
)
error decoding response body
)error decoding response body
)
@crepererum had a good point that automatically requesting the remainder of a request that timed out would have the nice property of automatically adjusting to network conditions For example, if the network was fast the request would just proceed as normal. If the network was not as fast that is ok too as the timeout would be hit, and then the request retried. And we wouldn't have to make any up front determination about the network or request size |
Copying some discussion with @ryzhyk from #14: In terms of rety the idea is that the rety doesn't retry the entire request. Instead it would only retry the remaining bytes that had not yet been returned. So let's say you had a 200 MB request but the network can only retrieve 10MB in 30s
|
Migrating from arrow-rs issue #7242 |
Is someone working on this? I would like to take a jab at this |
@ion-elgreco thank you :) |
Problem Description
if a request fails mid-stream (after we begin to read data) it is not retried and instead an error is returned. The error message, somewhat confusingly, often says
error decoding response body
Some examples:
Workaround
You can often work around this error by increasing the network timeout to something longer than the 30s default
Related Tickets
error decoding response body
after upgrade to object store 0.10 #272to_pyarrow_table()
on a table in S3 kept getting "Generic S3 error: error decoding response body" delta-io/delta-rs#2595As @crepererum says on #272 :
Background
Streaming ✅
Some APIs like
ObjectStore::get
are "streaming" in the sense that they start returning data as soon as it comes back from the network (as opposed to buffering the response before returning to the caller)This is great for performance as response processing can happen immediately and limits memory usage for large payloads 🏆
Retries ✅
In order to deal with the intermittent errors that occur processing object store requests, most ObjectStore implementations retry the request if they encounter error (see retry.rs)
Retries + Streaming ❌
However, there is a problem when streaming is mixed with the existing retries. Specifically, if a request fails mid-stream (after some, but not all, of the data has been returned to the client), just retrying the entire request isn't enough because then the client would be potentially be given the same data from the start of the response that it had already been given
Solution
Describe the solution you'd like
Implementing retries for streaming reads would need something more complicated like retrying the request just for the bytes that hadn't been already read
Any solution for this I think needs:
Describe alternatives you've considered
@crepererum suggests on #272 :
The text was updated successfully, but these errors were encountered: