platoneko commented on code in PR #22296:
URL: https://github.com/apache/doris/pull/22296#discussion_r1288200482


##########
be/src/io/fs/s3_file_writer.cpp:
##########
@@ -357,6 +365,9 @@ void S3FileWriter::_put_object(S3FileBuffer& buf) {
     DCHECK(!_closed) << "closed " << _closed;
     Aws::S3::Model::PutObjectRequest request;
     request.WithBucket(_bucket).WithKey(_key);
+    const auto& _stream_ptr = buf.get_stream();

Review Comment:
   
   ```suggestion
       const auto& stream_ptr = buf.get_stream();
   ```
   And change `std::shared_ptr<std::iostream> 
S3FileWriteBufferpool::get_stream()` to `const std::shared_ptr<std::iostream>& 
S3FileWriteBufferpool::get_stream()`



##########
be/src/io/fs/s3_file_writer.cpp:
##########
@@ -259,7 +267,7 @@ void S3FileWriter::_upload_one_part(int64_t part_num, 
S3FileBuffer& buf) {
     
upload_request.WithBucket(_bucket).WithKey(_key).WithPartNumber(part_num).WithUploadId(
             _upload_id);
 
-    auto _stream_ptr = buf.get_stream();
+    const auto& _stream_ptr = buf.get_stream();

Review Comment:
   ditto



-- 
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]


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

Reply via email to