Xuanwo opened a new pull request, #3005:
URL: https://github.com/apache/incubator-opendal/pull/3005

   This PR will add written bytes into `oio::Write`.
   
   # Background
   
   The `oio::Write` function was originally designed to ensure that both the 
`write` and `sink` operations write all content at once, in order to make it 
easier to use. However, this behavior creates a significant amount of 
additional work for services that need to ensure reentrancy in their writes.
   
   In some cases, such as with HDFS, implementing this behavior becomes 
impossible due to limitations like lack of support for seek write.
   
   Additionally, it places a heavy burden on correctly implementing buffer 
logic because all operations must be reentrant. As a result, more content needs 
to be buffered and returned when required.
   
   # Current
   
   This PR just adds a `written` bytes into `oio::Write`, public API like 
`Writer::write` is not touched. `Writer::sink` and `Writer::copy` changed to 
return written bytes which should be treated as a breaking change.
   
   No services side behavior change yet. In the future, we will change the `fs` 
and `hdfs`'s implement so that we don't need to call `write_all` and maintain 
internal `pos`.


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