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 e88b8cc9739 [chore](config) add config for brpc::usercode_in_pthread
to let asan (#54656)
e88b8cc9739 is described below
commit e88b8cc97399517492bbe8fb6df7fa974c89eec0
Author: Yongqiang YANG <[email protected]>
AuthorDate: Fri Aug 15 09:48:39 2025 +0800
[chore](config) add config for brpc::usercode_in_pthread to let asan
(#54656)
happy
Co-authored-by: Yongqiang YANG <[email protected]>
---
be/src/common/config.cpp | 2 ++
be/src/common/config.h | 2 ++
be/src/service/brpc_service.cpp | 4 ++++
3 files changed, 8 insertions(+)
diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 83c0c81ee6c..50c8ca70193 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -803,6 +803,8 @@ DEFINE_String(default_rowset_type, "BETA");
// Maximum size of a single message body in all protocols
DEFINE_Int64(brpc_max_body_size, "3147483648");
DEFINE_Int64(brpc_socket_max_unwritten_bytes, "-1");
+DEFINE_mBool(brpc_usercode_in_pthread, "false");
+
// TODO(zxy): expect to be true in v1.3
// Whether to embed the ProtoBuf Request serialized string together with
Tuple/Block data into
// Controller Attachment and send it through http brpc when the length of the
Tuple/Block data
diff --git a/be/src/common/config.h b/be/src/common/config.h
index 09dec502a8d..4595f416c49 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -828,6 +828,8 @@ DECLARE_Int64(brpc_max_body_size);
// Default, if the physical memory is less than or equal to 64G, the value is
1G
// if the physical memory is greater than 64G, the value is physical
memory * mem_limit(0.8) / 1024 * 20
DECLARE_Int64(brpc_socket_max_unwritten_bytes);
+// Whether to set FLAGS_usercode_in_pthread to true in brpc
+DECLARE_mBool(brpc_usercode_in_pthread);
// TODO(zxy): expect to be true in v1.3
// Whether to embed the ProtoBuf Request serialized string together with
Tuple/Block data into
// Controller Attachment and send it through http brpc when the length of the
Tuple/Block data
diff --git a/be/src/service/brpc_service.cpp b/be/src/service/brpc_service.cpp
index 8cf0e330aa9..4aaf526281c 100644
--- a/be/src/service/brpc_service.cpp
+++ b/be/src/service/brpc_service.cpp
@@ -41,6 +41,7 @@ namespace brpc {
DECLARE_uint64(max_body_size);
DECLARE_int64(socket_max_unwritten_bytes);
+DECLARE_bool(usercode_in_pthread);
} // namespace brpc
@@ -48,6 +49,9 @@ namespace doris {
BRpcService::BRpcService(ExecEnv* exec_env) : _exec_env(exec_env), _server(new
brpc::Server()) {
// Set config
+ if (config::brpc_usercode_in_pthread) {
+ brpc::FLAGS_usercode_in_pthread = true;
+ }
brpc::FLAGS_max_body_size = config::brpc_max_body_size;
brpc::FLAGS_socket_max_unwritten_bytes =
config::brpc_socket_max_unwritten_bytes != -1
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]