!6401 增加UWAL与最大可用模式互斥逻辑

Merge pull request !6401 from luqichao/most_sync_fix_6.0.0
This commit is contained in:
opengauss_bot
2024-09-23 02:33:54 +00:00
committed by Gitee
2 changed files with 20 additions and 1 deletions

View File

@ -214,6 +214,8 @@ static bool check_and_assign_namespace_oids(List* elemlist);
static bool check_and_assign_general_oids(List* elemlist);
static int GetLengthAndCheckReplConn(const char* ConnInfoList);
static bool check_most_available_sync_param(bool* newval, void** extra, GucSource source);
static bool check_ss_interconnect_url(char **newval, void **extra, GucSource source);
static bool check_ss_ock_log_path(char **newval, void **extra, GucSource source);
static bool check_ss_interconnect_type(char **newval, void **extra, GucSource source);
@ -811,7 +813,7 @@ static void InitStorageConfigureNamesBool()
},
&u_sess->attr.attr_storage.guc_most_available_sync,
false,
NULL,
check_most_available_sync_param,
NULL,
NULL},
{{"enable_show_any_tuples",
@ -6568,6 +6570,18 @@ static int GetLengthAndCheckReplConn(const char* ConnInfoList)
return repl_len;
}
static bool check_most_available_sync_param(bool* newval, void** extra, GucSource source)
{
if (source == PGC_S_DEFAULT) {
return true;
}
if (*newval && g_instance.attr.attr_storage.enable_uwal) {
ereport(ERROR, (errmsg("Do not allow both enable uwal and most_available_sync")));
return false;
}
return true;
}
static bool check_ss_interconnect_type(char **newval, void **extra, GucSource source)
{
return (strcmp("TCP", *newval) == 0 || strcmp("RDMA", *newval) == 0);

View File

@ -448,6 +448,11 @@ int GsUwalInit(ServerMode serverMode)
}
}
if ((volatile bool)u_sess->attr.attr_storage.guc_most_available_sync) {
ereport(ERROR, (errmsg("uwal only support most_available_sync is 'off'")));
return ret;
}
if (GsUwalLoadSymbols() != 0) {
ereport(ERROR, (errmsg("failed to dlopen libuwal.so")));
return ret;