diqiu50 commented on code in PR #6280:
URL: https://github.com/apache/gravitino/pull/6280#discussion_r1942321715
##########
clients/filesystem-fuse/src/open_dal_filesystem.rs:
##########
@@ -210,19 +227,44 @@ impl FileReader for FileReaderImpl {
struct FileWriterImpl {
writer: opendal::Writer,
+ buffer: Vec<u8>,
+}
+
+impl FileWriterImpl {
+ fn new(writer: opendal::Writer) -> Self {
+ Self {
+ writer,
+ buffer: Vec::with_capacity(OpenDalFileSystem::WRITE_BUFFER_SIZE +
4096),
Review Comment:
S3 requires batch writing of data when the batch size exceeds
WRITE_BUFFER_SIZE. The purpose of adding 4096 bytes is to avoid memory
reallocation when the buffer size is just slightly larger than
WRITE_BUFFER_SIZE. Since FUSE writes data by page(block_size), the incremental
increase will not exceed one page.
--
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]