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

dataroaring 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 7a75f8c380f [improve](move-memtable) set brpc streaming params in 
config (#27442)
7a75f8c380f is described below

commit 7a75f8c380feaa772f7afe180bbfff077bc3f765
Author: Kaijie Chen <[email protected]>
AuthorDate: Thu Nov 23 14:14:43 2023 +0800

    [improve](move-memtable) set brpc streaming params in config (#27442)
---
 be/src/common/config.cpp             | 7 +++++++
 be/src/common/config.h               | 7 +++++++
 be/src/vec/sink/load_stream_stub.cpp | 6 +++---
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 59ff35a3a5c..2f52bd44173 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -746,6 +746,13 @@ DEFINE_Bool(share_delta_writers, "true");
 // timeout for open load stream rpc in ms
 DEFINE_Int64(open_load_stream_timeout_ms, "500");
 
+// idle timeout for load stream in ms
+DEFINE_Int64(load_stream_idle_timeout_ms, "600000");
+// brpc streaming max_buf_size in bytes
+DEFINE_Int64(load_stream_max_buf_size, "20971520"); // 20MB
+// brpc streaming messages_in_batch
+DEFINE_Int32(load_stream_messages_in_batch, "128");
+
 // max send batch parallelism for OlapTableSink
 // The value set by the user for send_batch_parallelism is not allowed to 
exceed max_send_batch_parallelism_per_job,
 // if exceed, the value of send_batch_parallelism would be 
max_send_batch_parallelism_per_job
diff --git a/be/src/common/config.h b/be/src/common/config.h
index bc938165817..e13d6dcfd4a 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -803,6 +803,13 @@ DECLARE_Bool(share_delta_writers);
 // timeout for open load stream rpc in ms
 DECLARE_Int64(open_load_stream_timeout_ms);
 
+// idle timeout for load stream in ms
+DECLARE_Int64(load_stream_idle_timeout_ms);
+// brpc streaming max_buf_size in bytes
+DECLARE_Int64(load_stream_max_buf_size);
+// brpc streaming messages_in_batch
+DECLARE_Int32(load_stream_messages_in_batch);
+
 // max send batch parallelism for OlapTableSink
 // The value set by the user for send_batch_parallelism is not allowed to 
exceed max_send_batch_parallelism_per_job,
 // if exceed, the value of send_batch_parallelism would be 
max_send_batch_parallelism_per_job
diff --git a/be/src/vec/sink/load_stream_stub.cpp 
b/be/src/vec/sink/load_stream_stub.cpp
index 793098a3e9d..76907713fde 100644
--- a/be/src/vec/sink/load_stream_stub.cpp
+++ b/be/src/vec/sink/load_stream_stub.cpp
@@ -134,9 +134,9 @@ Status 
LoadStreamStub::open(BrpcClientCache<PBackendService_Stub>* client_cache,
     _handler.set_load_id(_load_id);
     std::string host_port = get_host_port(node_info.host, node_info.brpc_port);
     brpc::StreamOptions opt;
-    opt.max_buf_size = 20 << 20; // 20MB
-    opt.idle_timeout_ms = 30000;
-    opt.messages_in_batch = 128;
+    opt.max_buf_size = config::load_stream_max_buf_size;
+    opt.idle_timeout_ms = config::load_stream_idle_timeout_ms;
+    opt.messages_in_batch = config::load_stream_messages_in_batch;
     opt.handler = &_handler;
     brpc::Controller cntl;
     if (int ret = StreamCreate(&_stream_id, cntl, &opt)) {


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

Reply via email to