dblink_write implement [FEAT MERGE]

Co-authored-by: zzg19950727 <1071026277@qq.com>
Co-authored-by: xianyu-w <707512433@qq.com>
This commit is contained in:
obdev
2023-01-29 16:23:18 +08:00
committed by ob-robot
parent 195ab500ab
commit 814de27a42
226 changed files with 9602 additions and 4087 deletions

View File

@ -144,6 +144,7 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[] = {
"_set_last_archive_timestamp",
"_set_purge_job_interval",
"_set_purge_job_status",
"_set_reverse_dblink_infos",
"_windowfunc_optimization_settings",
"auto_increment_cache_size",
"auto_increment_increment",
@ -369,6 +370,7 @@ const ObSysVarClassType ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[] = {
SYS_VAR__SET_LAST_ARCHIVE_TIMESTAMP,
SYS_VAR__SET_PURGE_JOB_INTERVAL,
SYS_VAR__SET_PURGE_JOB_STATUS,
SYS_VAR__SET_REVERSE_DBLINK_INFOS,
SYS_VAR__WINDOWFUNC_OPTIMIZATION_SETTINGS,
SYS_VAR_AUTO_INCREMENT_CACHE_SIZE,
SYS_VAR_AUTO_INCREMENT_INCREMENT,
@ -789,7 +791,8 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_ID[] = {
"ob_sql_plan_memory_percentage",
"log_row_value_options",
"ob_max_read_stale_time",
"online_opt_stat_gather"
"online_opt_stat_gather",
"_set_reverse_dblink_infos"
};
bool ObSysVarFactory::sys_var_name_case_cmp(const char *name1, const ObString &name2)
@ -1179,6 +1182,7 @@ int ObSysVarFactory::create_all_sys_vars()
+ sizeof(ObSysVarLogRowValueOptions)
+ sizeof(ObSysVarObMaxReadStaleTime)
+ sizeof(ObSysVarOnlineOptStatGather)
+ sizeof(ObSysVarSetReverseDblinkInfos)
;
void *ptr = NULL;
if (OB_ISNULL(ptr = allocator_.alloc(total_mem_size))) {
@ -3185,6 +3189,15 @@ int ObSysVarFactory::create_all_sys_vars()
ptr = (void *)((char *)ptr + sizeof(ObSysVarOnlineOptStatGather));
}
}
if (OB_SUCC(ret)) {
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarSetReverseDblinkInfos())) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_ERROR("fail to new ObSysVarSetReverseDblinkInfos", K(ret));
} else {
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR__SET_REVERSE_DBLINK_INFOS))] = sys_var_ptr;
ptr = (void *)((char *)ptr + sizeof(ObSysVarSetReverseDblinkInfos));
}
}
}
return ret;
@ -5653,6 +5666,17 @@ int ObSysVarFactory::create_sys_var(ObSysVarClassType sys_var_id, ObBasicSysVar
}
break;
}
case SYS_VAR__SET_REVERSE_DBLINK_INFOS: {
void *ptr = NULL;
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarSetReverseDblinkInfos)))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarSetReverseDblinkInfos)));
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarSetReverseDblinkInfos())) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_ERROR("fail to new ObSysVarSetReverseDblinkInfos", K(ret));
}
break;
}
default: {
ret = OB_ERR_UNEXPECTED;