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 a6e14150dbc branch-3.1: [improvement](BeConfig)Add Be config to 
control the public or private endpoint #57580 (#57776)
a6e14150dbc is described below

commit a6e14150dbc06c562411320da6aaaddf45a8a597
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Nov 10 11:02:58 2025 +0800

    branch-3.1: [improvement](BeConfig)Add Be config to control the public or 
private endpoint #57580 (#57776)
    
    Cherry-picked from #57580
    
    Co-authored-by: Refrain <[email protected]>
---
 be/src/cloud/config.cpp          | 2 ++
 be/src/cloud/config.h            | 3 +++
 be/src/runtime/runtime_state.cpp | 7 ++++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/be/src/cloud/config.cpp b/be/src/cloud/config.cpp
index 9c6ae3a6b91..474d79715ff 100644
--- a/be/src/cloud/config.cpp
+++ b/be/src/cloud/config.cpp
@@ -64,6 +64,8 @@ DEFINE_mInt32(mow_stream_load_commit_retry_times, "5");
 
 DEFINE_mBool(save_load_error_log_to_s3, "false");
 
+DEFINE_mBool(use_public_endpoint_for_error_log, "true");
+
 DEFINE_mInt32(sync_load_for_tablets_thread, "32");
 
 DEFINE_mBool(enable_new_tablet_do_compaction, "true");
diff --git a/be/src/cloud/config.h b/be/src/cloud/config.h
index 82add5245fd..03af16a5a44 100644
--- a/be/src/cloud/config.h
+++ b/be/src/cloud/config.h
@@ -106,6 +106,9 @@ DECLARE_mInt32(mow_stream_load_commit_retry_times);
 
 DECLARE_mBool(save_load_error_log_to_s3);
 
+// Whether to use public endpoint for error log presigned URL
+DECLARE_mBool(use_public_endpoint_for_error_log);
+
 // the theads which sync the datas which loaded in other clusters
 DECLARE_mInt32(sync_load_for_tablets_thread);
 
diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp
index dcf17778ff8..04d669c0f11 100644
--- a/be/src/runtime/runtime_state.cpp
+++ b/be/src/runtime/runtime_state.cpp
@@ -463,9 +463,10 @@ std::string RuntimeState::get_error_log_file_path() {
         }
         // expiration must be less than a week (in seconds) for presigned url
         static const unsigned EXPIRATION_SECONDS = 7 * 24 * 60 * 60 - 1;
-        // We should return a public endpoint to user.
-        _error_log_file_path = 
_s3_error_fs->generate_presigned_url(_s3_error_log_file_path,
-                                                                    
EXPIRATION_SECONDS, true);
+        // Use public or private endpoint based on configuration
+        _error_log_file_path =
+                _s3_error_fs->generate_presigned_url(_s3_error_log_file_path, 
EXPIRATION_SECONDS,
+                                                     
config::use_public_endpoint_for_error_log);
     }
     return _error_log_file_path;
 }


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

Reply via email to