You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
writer: support passing ChunkedBytes in Writer::write #4414
We have a use case to upload non-continuous bytes in memory (e.g. Vec<Bytes>) in a part for S3 multipart upload. Under the current interface, we need flatten these bytes into continuous bytes because the writer accepts Into<Bytes> as the payload, which requires extra copy and memory allocation.
I noticed that internally OpenDAL uses oio::WriterBuffer in the poll_write interface with one of its implementation to be ChunkedBytes, which is the data structure I am looking for. I am thinking whether it is more favorable to let writer accepts impl WriteBuf as the payload instead to enable more use cases efficiently. Open to better ideas as well.
Thank you for bringing this to our attention; it aligns perfectly with the concept I plan to introduce in OpenDAL.
My current plan is to expose bytes::Buf so users can implement non-continuous bytes by their own. And opendal will use APIs like copy_to_bytes or chunks_vectored to minimize the cost.
Thank you for bringing this to our attention; it aligns perfectly with the concept I plan to introduce in OpenDAL.
My current plan is to expose bytes::Buf so users can implement non-continuous bytes by their own. And opendal will use APIs like copy_to_bytes or chunks_vectored to minimize the cost.
Thanks! That's even better! It is not an urgent request but we look forward to it.
We have a Buffer which support both continuous and non-continuous bytes. Users will be able to passing Vec<Bytes> into writer and opendal will not perform any copy around inner bytes.
Welcome to join the development to make them release faster!
Activity
Xuanwo commentedon Apr 1, 2024
Thank you for bringing this to our attention; it aligns perfectly with the concept I plan to introduce in OpenDAL.
My current plan is to expose
bytes::Bufso users can implement non-continuous bytes by their own. And opendal will use APIs likecopy_to_bytesorchunks_vectoredto minimize the cost.hzxa21 commentedon Apr 1, 2024
Thanks! That's even better! It is not an urgent request but we look forward to it.
Xuanwo commentedon Apr 9, 2024
Should be fixed by #4452
We have a
Bufferwhich support both continuous and non-continuous bytes. Users will be able to passingVec<Bytes>into writer and opendal will not perform any copy around inner bytes.Welcome to join the development to make them release faster!