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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 85f97a745ad [fix](s3) Fix fmt in s3 file wirter 
S3FileWriter::_dump_completed_part OOM (#39562)
85f97a745ad is described below

commit 85f97a745ad5826c854b8767e733abb21a3b0eb1
Author: Gavin Chou <[email protected]>
AuthorDate: Mon Aug 19 22:02:06 2024 +0800

    [fix](s3) Fix fmt in s3 file wirter S3FileWriter::_dump_completed_part OOM 
(#39562)
---
 be/src/io/fs/s3_file_writer.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/be/src/io/fs/s3_file_writer.cpp b/be/src/io/fs/s3_file_writer.cpp
index ba5fce83e5c..682c8542a9f 100644
--- a/be/src/io/fs/s3_file_writer.cpp
+++ b/be/src/io/fs/s3_file_writer.cpp
@@ -533,11 +533,12 @@ void S3FileWriter::_put_object(UploadFileBuffer& buf) {
 }
 
 std::string S3FileWriter::_dump_completed_part() const {
-    std::string view;
+    std::stringstream ss;
+    ss << "part_numbers:";
     for (const auto& part : _completed_parts) {
-        view.append(fmt::format("part {}, ", view, part->GetPartNumber()));
+        ss << " " << part->GetPartNumber();
     }
-    return view;
+    return ss.str();
 }
 
 } // namespace doris::io


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

Reply via email to