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

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

commit 872e1f6687cf8f8a0961b9a63687af469a78dfb6
Author: walter <[email protected]>
AuthorDate: Tue Feb 20 22:17:37 2024 +0800

    [fix](backup) fix concurrent upload and release snapshot crash (#31144)
    
    In upload implementation, filesystem::size throws an exception
    if the specified file, which is removed by the release snapshot
    task, does not exist.
---
 be/src/io/fs/s3_file_system.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/be/src/io/fs/s3_file_system.cpp b/be/src/io/fs/s3_file_system.cpp
index 207bd9dff49..7b443ca6804 100644
--- a/be/src/io/fs/s3_file_system.cpp
+++ b/be/src/io/fs/s3_file_system.cpp
@@ -381,11 +381,10 @@ Status S3FileSystem::upload_impl(const Path& local_file, 
const Path& remote_file
                                                               
local_file.native(), full_path(key)));
     }
 
-    auto file_size = std::filesystem::file_size(local_file);
+    auto size = handle->GetBytesTransferred();
     LOG(INFO) << "Upload " << local_file.native() << " to s3, endpoint=" << 
_s3_conf.endpoint
               << ", bucket=" << _s3_conf.bucket << ", key=" << key
-              << ", duration=" << duration.count() << ", capacity=" << 
file_size
-              << ", tp=" << (file_size) / duration.count();
+              << ", duration=" << duration.count() << ", bytes=" << size;
 
     return Status::OK();
 }


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

Reply via email to