You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2025/11/08 12:45:41 UTC

(doris) branch branch-4.0 updated: branch-4.0: [improvement](BeConfig)Add Be config to control the public or private endpoint #57580 (#57777)

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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new fde5503ca92 branch-4.0: [improvement](BeConfig)Add Be config to control the public or private endpoint #57580 (#57777)
fde5503ca92 is described below

commit fde5503ca920c42ac147b1806ec1e940d9ba0c74
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Sat Nov 8 20:45:34 2025 +0800

    branch-4.0: [improvement](BeConfig)Add Be config to control the public or private endpoint #57580 (#57777)
    
    Cherry-picked from #57580
    
    Co-authored-by: Refrain <11...@users.noreply.github.com>
---
 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 8d30113e0cf..5f7c94428a5 100644
--- a/be/src/cloud/config.cpp
+++ b/be/src/cloud/config.cpp
@@ -65,6 +65,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 38092b34ff4..3542808992b 100644
--- a/be/src/cloud/config.h
+++ b/be/src/cloud/config.h
@@ -107,6 +107,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 2beeed23c05..a99b9458972 100644
--- a/be/src/runtime/runtime_state.cpp
+++ b/be/src/runtime/runtime_state.cpp
@@ -424,9 +424,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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org