Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
5738f6e9
O
oceanbase
项目概览
oceanbase
/
oceanbase
接近 2 年 前同步成功
通知
262
Star
6084
Fork
1301
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5738f6e9
编写于
12月 10, 2024
作者:
C
cqliang1995
提交者:
ob-robot
12月 10, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add _max_dblink_conn_per_observer cfg.
上级
20d9e216
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
2 deletion
+18
-2
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.cpp
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.cpp
+5
-0
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.h
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.h
+1
-0
deps/oblib/src/lib/mysqlclient/ob_server_connection_pool.cpp
deps/oblib/src/lib/mysqlclient/ob_server_connection_pool.cpp
+2
-1
src/share/parameter/ob_parameter_seed.ipp
src/share/parameter/ob_parameter_seed.ipp
+3
-1
src/sql/dblink/ob_dblink_utils.cpp
src/sql/dblink/ob_dblink_utils.cpp
+6
-0
tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result
...inner_table/r/mysql/all_virtual_sys_parameter_stat.result
+1
-0
未找到文件。
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.cpp
浏览文件 @
5738f6e9
...
@@ -44,6 +44,11 @@ bool __attribute__((weak)) get_enable_dblink_cfg()
...
@@ -44,6 +44,11 @@ bool __attribute__((weak)) get_enable_dblink_cfg()
return
true
;
return
true
;
}
}
uint64_t
__attribute__
((
weak
))
get_max_dblink_conn_per_observer
()
{
return
256
;
}
namespace
oceanbase
namespace
oceanbase
{
{
namespace
common
namespace
common
...
...
deps/oblib/src/lib/mysqlclient/ob_dblink_error_trans.h
浏览文件 @
5738f6e9
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
extern
bool
get_dblink_reuse_connection_cfg
();
extern
bool
get_dblink_reuse_connection_cfg
();
extern
bool
get_enable_dblink_cfg
();
extern
bool
get_enable_dblink_cfg
();
extern
uint64_t
get_max_dblink_conn_per_observer
();
namespace
oceanbase
namespace
oceanbase
{
{
...
...
deps/oblib/src/lib/mysqlclient/ob_server_connection_pool.cpp
浏览文件 @
5738f6e9
...
@@ -210,6 +210,7 @@ int ObServerConnectionPool::init_dblink(uint64_t tenant_id, uint64_t dblink_id,
...
@@ -210,6 +210,7 @@ int ObServerConnectionPool::init_dblink(uint64_t tenant_id, uint64_t dblink_id,
ObMySQLConnectionPool
*
root
,
int64_t
max_allowed_conn_count
)
ObMySQLConnectionPool
*
root
,
int64_t
max_allowed_conn_count
)
{
{
UNUSED
(
conn_str
);
UNUSED
(
conn_str
);
UNUSED
(
max_allowed_conn_count
);
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
root
))
{
if
(
OB_ISNULL
(
root
))
{
ret
=
OB_INVALID_ARGUMENT
;
ret
=
OB_INVALID_ARGUMENT
;
...
@@ -236,7 +237,7 @@ int ObServerConnectionPool::init_dblink(uint64_t tenant_id, uint64_t dblink_id,
...
@@ -236,7 +237,7 @@ int ObServerConnectionPool::init_dblink(uint64_t tenant_id, uint64_t dblink_id,
root_
=
root
;
root_
=
root
;
last_renew_timestamp_
=
::
oceanbase
::
common
::
ObTimeUtility
::
current_time
();
last_renew_timestamp_
=
::
oceanbase
::
common
::
ObTimeUtility
::
current_time
();
server_not_available_
=
false
;
server_not_available_
=
false
;
max_allowed_conn_count_
=
max_allowed_conn_count
;
max_allowed_conn_count_
=
get_max_dblink_conn_per_observer
()
;
connection_pool_ptr_
=
&
dblink_connection_pool_
;
connection_pool_ptr_
=
&
dblink_connection_pool_
;
if
(
cluster_str
.
empty
())
{
if
(
cluster_str
.
empty
())
{
(
void
)
snprintf
(
db_user_
,
sizeof
(
db_user_
),
"%.*s@%.*s"
,
db_user
.
length
(),
db_user
.
ptr
(),
(
void
)
snprintf
(
db_user_
,
sizeof
(
db_user_
),
"%.*s@%.*s"
,
db_user
.
length
(),
db_user
.
ptr
(),
...
...
src/share/parameter/ob_parameter_seed.ipp
浏览文件 @
5738f6e9
...
@@ -1667,7 +1667,9 @@ DEF_BOOL(_enable_dblink_reuse_connection, OB_TENANT_PARAMETER, "True",
...
@@ -1667,7 +1667,9 @@ DEF_BOOL(_enable_dblink_reuse_connection, OB_TENANT_PARAMETER, "True",
DEF_INT(_with_subquery, OB_TENANT_PARAMETER, "0", "[0,2]",
DEF_INT(_with_subquery, OB_TENANT_PARAMETER, "0", "[0,2]",
"WITH subquery transformation,0: optimizer,1: materialize,2: inline",
"WITH subquery transformation,0: optimizer,1: materialize,2: inline",
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_INT(_max_dblink_conn_per_observer, OB_TENANT_PARAMETER, "256", "[0,)",
"The maximum limit on the number of connections that can be opened simultaneously for a specific observer for any DBLink, default value is 256",
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_BOOL(_xsolapi_generate_with_clause, OB_TENANT_PARAMETER, "True",
DEF_BOOL(_xsolapi_generate_with_clause, OB_TENANT_PARAMETER, "True",
"OLAP API generates WITH clause",
"OLAP API generates WITH clause",
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
...
...
src/sql/dblink/ob_dblink_utils.cpp
浏览文件 @
5738f6e9
...
@@ -43,6 +43,12 @@ bool get_enable_dblink_cfg()
...
@@ -43,6 +43,12 @@ bool get_enable_dblink_cfg()
return
GCONF
.
enable_dblink
;
return
GCONF
.
enable_dblink
;
}
}
uint64_t
get_max_dblink_conn_per_observer
()
{
omt
::
ObTenantConfigGuard
tenant_config
(
TENANT_CONF
(
MTL_ID
()));
return
tenant_config
.
is_valid
()
?
tenant_config
->
_max_dblink_conn_per_observer
:
256
;
}
uint64_t
ObDblinkService
::
get_current_tenant_id
()
uint64_t
ObDblinkService
::
get_current_tenant_id
()
{
{
return
MTL_ID
();
return
MTL_ID
();
...
...
tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_sys_parameter_stat.result
浏览文件 @
5738f6e9
...
@@ -341,6 +341,7 @@ _load_tde_encrypt_engine
...
@@ -341,6 +341,7 @@ _load_tde_encrypt_engine
_log_writer_parallelism
_log_writer_parallelism
_ls_gc_wait_readonly_tx_time
_ls_gc_wait_readonly_tx_time
_ls_migration_wait_completing_timeout
_ls_migration_wait_completing_timeout
_max_dblink_conn_per_observer
_max_elr_dependent_trx_count
_max_elr_dependent_trx_count
_max_ls_cnt_per_server
_max_ls_cnt_per_server
_max_malloc_sample_interval
_max_malloc_sample_interval
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录