tustvold opened a new issue, #87:
URL: https://github.com/apache/arrow-rs-object-store/issues/87

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   Currently where ObjectStore exposes APIs in terms of tokio's `AsyncWrite` 
and `AsyncRead`, any error poisons the entire operation. Subsequent attempts to 
read/write will likely result in a panic. This is not well documented, and may 
not be ideal.
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   At the very least we should document the current behaviour, but it is 
unclear, at least to me, what the "correct" behaviour here even is: 
   
   `AsyncWrite::poll_write` returns when the bytes have been "written" to the 
writer, including potentially to an in-flight buffer, see 
[here](https://docs.rs/tokio/latest/src/tokio/io/util/buf_writer.rs.html#119-134).
 In the case of `WriteMultiPart` this means `AsyncWrite::poll_write` returns 
`Ok` before any network to actually write the data to object storage. 
   
   Any errors will therefore be surfaced in `AsyncWrite::poll_flush` or 
`AsyncWrite::poll_shutdown`, which presents a few problems:
   
   * The `PutPart` implementation retries intermittent errors based on the 
`RetryConfig`, and so we **must** surface any errors to the user
   * It is unclear how the caller can determine from the error what byte range 
needs to be retried, as part uploads are chunked and parallel
   * It is unclear how the caller could retry this byte range even if it could 
be ascertained
   
   This all makes me think that the current behaviour is probably the best we 
can do, short of not using the tokio IO traits, but I wonder if others have any 
thoughts on this
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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]

Reply via email to