Skip to content

Commit

Permalink
[Config](brpc) Add connection_type config for brpc
Browse files Browse the repository at this point in the history
  • Loading branch information
HappenLee committed Jan 26, 2025
1 parent 8424b43 commit 69e99df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,8 @@ DEFINE_mBool(enable_sleep_between_delete_cumu_compaction, "false");

DEFINE_mInt32(compaction_num_per_round, "1");

DEFINE_mString(brpc_connection_type, "single");

// clang-format off
#ifdef BE_TEST
// test s3
Expand Down
2 changes: 2 additions & 0 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,8 @@ DECLARE_Bool(enable_table_size_correctness_check);
DECLARE_mBool(enable_sleep_between_delete_cumu_compaction);

DECLARE_mInt32(compaction_num_per_round);
// Set default of brpc_connection_type to "single/pooled/short".
DECLARE_String(brpc_connection_type);

#ifdef BE_TEST
// test s3
Expand Down
2 changes: 1 addition & 1 deletion be/src/util/brpc_client_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BrpcClientCache<PBackendService_Stub>::BrpcClientCache(std::string protocol,
std::string connection_type,
std::string connection_group)
: _protocol(protocol),
_connection_type(connection_type),
_connection_type(connection_type == "" ? config::brpc_connection_type : connection_type),
_connection_group(connection_group) {
if (connection_group == "streaming") {
REGISTER_HOOK_METRIC(brpc_stream_endpoint_stub_count,
Expand Down

0 comments on commit 69e99df

Please sign in to comment.