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

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 15924a0887b [security](cloud) Support to set internal port for builtin 
brpc services on MS (#58810)
15924a0887b is described below

commit 15924a0887bbf35f7310bc98721439d17f57915f
Author: Gavin Chou <[email protected]>
AuthorDate: Mon Dec 8 19:38:46 2025 +0800

    [security](cloud) Support to set internal port for builtin brpc services on 
MS (#58810)
---
 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 a1241038acb..406df75a06d 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