Repository navigation
feat(raw/oio): Use Buffer as cache in OneshotWrite - #4477
Conversation
|
Oops, too many impl should also be changed. Give me a minute 😉 |
Thank you! |
| let req = self.core.dbfs_create_file_request(&self.path, bs)?; | ||
| let req = self | ||
| .core | ||
| .dbfs_create_file_request(&self.path, bs.to_bytes())?; |
There was a problem hiding this comment.
This function would call BASE64_STANDARD.encode(body), which require a AsRef[u8], this is not implements for Buffer.
There was a problem hiding this comment.
We can add a helper function that uses base64::write::EncoderWriter. But I believe it's out of the scope of current PR, maybe worth a new one.
| self.write_simple(bs).await?; | ||
| } else { | ||
| self.write_chunked(bs).await?; | ||
| self.write_chunked(bs.to_bytes()).await?; |
There was a problem hiding this comment.
write_chunked splits continuous data in chunks. The migration to Buffer should not be trivial. WDYT?
There was a problem hiding this comment.
I do want to refactor OneDrive entirely. Its implementation doesn't fit well with our current design.
This closes #4456.