This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-4.0-preview
in repository https://gitbox.apache.org/repos/asf/doris.git

commit cb5de24b54885f287f1bd5d19966a21ea65175e7
Author: AlexYue <[email protected]>
AuthorDate: Mon Apr 22 19:42:37 2024 +0800

    n [fix](HDFS) Correctly set hdfs cache allocator's offset (#33960)
---
 be/src/io/fs/hdfs_file_writer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/io/fs/hdfs_file_writer.cpp 
b/be/src/io/fs/hdfs_file_writer.cpp
index b47e4c3f2d2..6f9105a89e7 100644
--- a/be/src/io/fs/hdfs_file_writer.cpp
+++ b/be/src/io/fs/hdfs_file_writer.cpp
@@ -226,6 +226,7 @@ Status HdfsFileWriter::_append(std::string_view content) {
         }
         size_t append_size = _batch_buffer.append(content);
         content.remove_prefix(append_size);
+        _bytes_appended += append_size;
         if (_batch_buffer.full()) {
             RETURN_IF_ERROR(_flush_buffer());
         }
@@ -240,7 +241,6 @@ Status HdfsFileWriter::appendv(const Slice* data, size_t 
data_cnt) {
 
     for (size_t i = 0; i < data_cnt; i++) {
         RETURN_IF_ERROR(_append({data[i].get_data(), data[i].get_size()}));
-        _bytes_appended += data[i].get_size();
     }
     return Status::OK();
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to