适配DSS接口与错误码修改

This commit is contained in:
liuzhanfeng2
2023-08-13 14:23:41 +08:00
committed by chendong76
parent 8a37df6d12
commit bc2f2d8eaf
11 changed files with 35 additions and 62 deletions

View File

@ -2156,7 +2156,8 @@ void initDSSConf(void)
}
// check whether dss connect is successful.
if (!dss_exist_dir(g_instance.attr.attr_storage.dss_attr.ss_dss_vg_name)) {
struct stat st;
if (stat(g_instance.attr.attr_storage.dss_attr.ss_dss_vg_name, &st) != 0 || !S_ISDIR(st.st_mode)) {
ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("Could not connect dssserver, vgname: \"%s\", socketpath: \"%s\"",
g_instance.attr.attr_storage.dss_attr.ss_dss_vg_name,