[CP] implement dblink reuse connection cfg
This commit is contained in:
@ -1679,7 +1679,9 @@ DEF_STR_WITH_CHECKER(rpc_server_authentication_method, OB_CLUSTER_PARAMETER, "AL
|
||||
DEF_BOOL(_enable_backtrace_function, OB_CLUSTER_PARAMETER, "True",
|
||||
"Decide whether to let the backtrace function take effect",
|
||||
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
DEF_BOOL(_enable_dblink_reuse_connection, OB_TENANT_PARAMETER, "True",
|
||||
"specifies whether dblink reuse connection in a session",
|
||||
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
DEF_INT(_with_subquery, OB_TENANT_PARAMETER, "0", "[0,2]",
|
||||
"WITH subquery transformation,0: optimizer,1: materialize,2: inline",
|
||||
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
@ -30,6 +30,14 @@ using namespace oceanbase::sql;
|
||||
using namespace oceanbase::share;
|
||||
|
||||
#ifdef OB_BUILD_DBLINK
|
||||
|
||||
bool get_dblink_reuse_connection_cfg()
|
||||
{
|
||||
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID()));
|
||||
// default value of _enable_dblink_reuse_connection is true, if !tenant_config.is_valid() return true
|
||||
return tenant_config.is_valid() ? tenant_config->_enable_dblink_reuse_connection : true;
|
||||
}
|
||||
|
||||
uint64_t ObDblinkService::get_current_tenant_id()
|
||||
{
|
||||
return MTL_ID();
|
||||
|
||||
Reference in New Issue
Block a user