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

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


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 3706269cc87 branch-3.1: [fix](resource) fix can't update BE s3 
resource config #43025 (#54228)
3706269cc87 is described below

commit 3706269cc87780c317afef8ff59d125df6537b33
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Aug 4 10:02:16 2025 +0800

    branch-3.1: [fix](resource) fix can't update BE s3 resource config #43025 
(#54228)
    
    Cherry-picked from #43025
    
    Co-authored-by: Xujian Duan <[email protected]>
---
 be/src/agent/task_worker_pool.cpp | 12 ++----------
 be/src/io/fs/s3_file_system.cpp   |  6 ++++--
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/be/src/agent/task_worker_pool.cpp 
b/be/src/agent/task_worker_pool.cpp
index 55975ddd1fb..74d639d1aac 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -1593,15 +1593,7 @@ void update_s3_resource(const TStorageResource& param, 
io::RemoteFileSystemSPtr
         DCHECK_EQ(existed_fs->type(), io::FileSystemType::S3) << param.id << ' 
' << param.name;
         auto client = 
static_cast<io::S3FileSystem*>(existed_fs.get())->client_holder();
         auto new_s3_conf = S3Conf::get_s3_conf(param.s3_storage_param);
-        S3ClientConf conf {
-                .endpoint {},
-                .region {},
-                .ak = std::move(new_s3_conf.client_conf.ak),
-                .sk = std::move(new_s3_conf.client_conf.sk),
-                .token = std::move(new_s3_conf.client_conf.token),
-                .bucket {},
-                .provider = new_s3_conf.client_conf.provider,
-        };
+        S3ClientConf conf = std::move(new_s3_conf.client_conf);
         st = client->reset(conf);
         fs = std::move(existed_fs);
     }
@@ -1609,7 +1601,7 @@ void update_s3_resource(const TStorageResource& param, 
io::RemoteFileSystemSPtr
     if (!st.ok()) {
         LOG(WARNING) << "update s3 resource failed: " << st;
     } else {
-        LOG_INFO("successfully update hdfs resource")
+        LOG_INFO("successfully update s3 resource")
                 .tag("resource_id", param.id)
                 .tag("resource_name", param.name);
         put_storage_resource(param.id, {std::move(fs)}, param.version);
diff --git a/be/src/io/fs/s3_file_system.cpp b/be/src/io/fs/s3_file_system.cpp
index 224368bf8d5..d74c539ca36 100644
--- a/be/src/io/fs/s3_file_system.cpp
+++ b/be/src/io/fs/s3_file_system.cpp
@@ -86,8 +86,7 @@ Status ObjClientHolder::reset(const S3ClientConf& conf) {
     S3ClientConf reset_conf;
     {
         std::shared_lock lock(_mtx);
-        if (conf.ak == _conf.ak && conf.sk == _conf.sk && conf.token == 
_conf.token &&
-            conf.use_virtual_addressing == _conf.use_virtual_addressing) {
+        if (conf.get_hash() == _conf.get_hash()) {
             return Status::OK(); // Same conf
         }
 
@@ -96,6 +95,9 @@ Status ObjClientHolder::reset(const S3ClientConf& conf) {
         reset_conf.sk = conf.sk;
         reset_conf.token = conf.token;
         reset_conf.bucket = conf.bucket;
+        reset_conf.connect_timeout_ms = conf.connect_timeout_ms;
+        reset_conf.max_connections = conf.max_connections;
+        reset_conf.request_timeout_ms = conf.request_timeout_ms;
         reset_conf.use_virtual_addressing = conf.use_virtual_addressing;
 
         reset_conf.role_arn = conf.role_arn;


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

Reply via email to