This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 6ce02086a17 [opt](brpc) Make the timeout of brpc checking configurable
(#44481)
6ce02086a17 is described below
commit 6ce02086a1775170e2c4d5d525f8f478ce478ffd
Author: Jerry Hu <[email protected]>
AuthorDate: Tue Nov 26 12:34:55 2024 +0800
[opt](brpc) Make the timeout of brpc checking configurable (#44481)
---
be/src/common/config.cpp | 2 ++
be/src/common/config.h | 2 ++
be/src/runtime/fragment_mgr.cpp | 5 ++++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 0cffa30cdca..63989a76261 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -554,6 +554,8 @@ DEFINE_Bool(enable_brpc_builtin_services, "true");
// Enable brpc connection check
DEFINE_Bool(enable_brpc_connection_check, "false");
+DEFINE_mInt64(brpc_connection_check_timeout_ms, "10000");
+
// The maximum amount of data that can be processed by a stream load
DEFINE_mInt64(streaming_load_max_mb, "102400");
// Some data formats, such as JSON, cannot be streamed.
diff --git a/be/src/common/config.h b/be/src/common/config.h
index caee1f320c1..29e55e64063 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -1016,6 +1016,8 @@ DECLARE_Bool(enable_brpc_builtin_services);
DECLARE_Bool(enable_brpc_connection_check);
+DECLARE_mInt64(brpc_connection_check_timeout_ms);
+
// Max waiting time to wait the "plan fragment start" rpc.
// If timeout, the fragment will be cancelled.
// This parameter is usually only used when the FE loses connection,
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 47b007edf5d..1e72fa756d3 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -1062,12 +1062,15 @@ void FragmentMgr::_check_brpc_available(const
std::shared_ptr<PBackendService_St
const std::string message = "hello doris!";
std::string error_message;
int32_t failed_count = 0;
+ const int64_t check_timeout_ms =
+ std::max<int64_t>(100, config::brpc_connection_check_timeout_ms);
+
while (true) {
PHandShakeRequest request;
request.set_hello(message);
PHandShakeResponse response;
brpc::Controller cntl;
- cntl.set_timeout_ms(500 * (failed_count + 1));
+ cntl.set_timeout_ms(check_timeout_ms);
cntl.set_max_retry(10);
brpc_stub->hand_shake(&cntl, &request, &response, nullptr);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]