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 724b9baf7d8 branch-3.1: [security](cloud) Support to set internal port 
for builtin brpc services on MS #58810 (#58823)
724b9baf7d8 is described below

commit 724b9baf7d8b204ed22e9a3d4e6d222a4761c9c7
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 9 15:03:34 2025 +0800

    branch-3.1: [security](cloud) Support to set internal port for builtin brpc 
services on MS #58810 (#58823)
    
    Cherry-picked from #58810
    
    Co-authored-by: Gavin Chou <[email protected]>
---
 cloud/src/common/config.h | 1 +
 cloud/src/main.cpp        | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cloud/src/common/config.h b/cloud/src/common/config.h
index 14b45bb48c4..1b8ebde1797 100644
--- a/cloud/src/common/config.h
+++ b/cloud/src/common/config.h
@@ -22,6 +22,7 @@
 namespace doris::cloud::config {
 
 CONF_Int32(brpc_listen_port, "5000");
+CONF_Int32(brpc_internal_listen_port, "-1");
 CONF_Int32(brpc_num_threads, "64");
 // connections without data transmission for so many seconds will be closed
 // Set -1 to disable it.
diff --git a/cloud/src/main.cpp b/cloud/src/main.cpp
index 861956e802d..fa91d138e15 100644
--- a/cloud/src/main.cpp
+++ b/cloud/src/main.cpp
@@ -333,6 +333,10 @@ int main(int argc, char** argv) {
     if (config::brpc_num_threads != -1) {
         options.num_threads = config::brpc_num_threads;
     }
+    int32_t internal_port = config::brpc_internal_listen_port;
+    if (internal_port > 0) {
+        options.internal_port = internal_port;
+    }
     int port = config::brpc_listen_port;
     if (server.Start(port, &options) != 0) {
         char buf[64];
@@ -350,7 +354,9 @@ int main(int argc, char** argv) {
     }
 
     msg = "successfully started service listening on port=" + 
std::to_string(port) +
-          " time_elapsed_ms=" + std::to_string(duration_cast<milliseconds>(end 
- start).count());
+          " time_elapsed_ms=" + std::to_string(duration_cast<milliseconds>(end 
- start).count()) +
+          (internal_port > 0 ? " internal_port=" + 
std::to_string(internal_port) : "");
+
     LOG(INFO) << msg;
     std::cout << msg << std::endl;
 


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

Reply via email to