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

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 44915f3513f [fix](Azure) Use robust logic to check there is no 
multipart upload for Azure (#36904)
44915f3513f is described below

commit 44915f3513fbf5df3597b7d8cacd006f823fa27a
Author: AlexYue <yj976240...@gmail.com>
AuthorDate: Thu Jun 27 19:31:18 2024 +0800

    [fix](Azure) Use robust logic to check there is no multipart upload for 
Azure (#36904)
    
    Azure has no logic for multi part load's upload id. We should use one
    robust way to check it.
---
 be/src/io/fs/s3_file_writer.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/be/src/io/fs/s3_file_writer.cpp b/be/src/io/fs/s3_file_writer.cpp
index 20c616ef90a..86ee36bab18 100644
--- a/be/src/io/fs/s3_file_writer.cpp
+++ b/be/src/io/fs/s3_file_writer.cpp
@@ -152,9 +152,7 @@ Status S3FileWriter::close(bool non_block) {
 Status S3FileWriter::_close_impl() {
     VLOG_DEBUG << "S3FileWriter::close, path: " << 
_obj_storage_path_opts.path.native();
 
-    const auto& upload_id =
-            _obj_storage_path_opts.upload_id.has_value() ? 
*_obj_storage_path_opts.upload_id : "";
-    if (upload_id.empty() && _pending_buf) {
+    if (_cur_part_num == 1 && _pending_buf) {
         RETURN_IF_ERROR(_set_upload_to_remote_less_than_buffer_size());
     }
 
@@ -339,9 +337,9 @@ Status S3FileWriter::_complete() {
         if (_failed || _completed_parts.size() != _cur_part_num) {
             _st = Status::InternalError(
                     "error status {}, have failed {}, complete parts {}, cur 
part num {}, whole "
-                    "parts {}, file path {}",
+                    "parts {}, file path {}, file size {}, has left buffer {}",
                     _st, _failed, _completed_parts.size(), _cur_part_num, 
_dump_completed_part(),
-                    _obj_storage_path_opts.path.native());
+                    _obj_storage_path_opts.path.native(), _bytes_appended, 
_pending_buf != nullptr);
             LOG(WARNING) << _st;
             return _st;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to