Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
51ee2f80
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
51ee2f80
编写于
12月 06, 2022
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: dataDir process for multi-tier storage
上级
283ef0d0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
11 deletion
+17
-11
source/util/src/tconfig.c
source/util/src/tconfig.c
+17
-11
未找到文件。
source/util/src/tconfig.c
浏览文件 @
51ee2f80
...
@@ -293,7 +293,7 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value,
...
@@ -293,7 +293,7 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value,
}
}
SDiskCfg
cfg
=
{
0
};
SDiskCfg
cfg
=
{
0
};
tstrncpy
(
cfg
.
dir
,
value
,
sizeof
(
cfg
.
dir
));
tstrncpy
(
cfg
.
dir
,
pItem
->
str
,
sizeof
(
cfg
.
dir
));
cfg
.
level
=
level
?
atoi
(
level
)
:
0
;
cfg
.
level
=
level
?
atoi
(
level
)
:
0
;
cfg
.
primary
=
primary
?
atoi
(
primary
)
:
1
;
cfg
.
primary
=
primary
?
atoi
(
primary
)
:
1
;
void
*
ret
=
taosArrayPush
(
pItem
->
array
,
&
cfg
);
void
*
ret
=
taosArrayPush
(
pItem
->
array
,
&
cfg
);
...
@@ -660,12 +660,13 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) {
...
@@ -660,12 +660,13 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) {
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_VAR
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_VAR
);
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_VAR
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_VAR
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
uInfo
(
"load from env variables cfg success"
);
uInfo
(
"load from env variables cfg success"
);
...
@@ -702,12 +703,13 @@ int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) {
...
@@ -702,12 +703,13 @@ int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) {
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_CMD
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_CMD
);
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_CMD
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_CMD
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
uInfo
(
"load from env cmd cfg success"
);
uInfo
(
"load from env cmd cfg success"
);
...
@@ -766,12 +768,13 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) {
...
@@ -766,12 +768,13 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) {
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_FILE
);
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_ENV_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_ENV_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
taosCloseFile
(
&
pFile
);
taosCloseFile
(
&
pFile
);
...
@@ -825,12 +828,13 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
...
@@ -825,12 +828,13 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_CFG_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_CFG_FILE
);
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_CFG_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_CFG_FILE
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
taosCloseFile
(
&
pFile
);
taosCloseFile
(
&
pFile
);
...
@@ -989,12 +993,14 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
...
@@ -989,12 +993,14 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
paGetToken
(
value2
+
vlen2
+
1
,
&
value3
,
&
vlen3
);
paGetToken
(
value2
+
vlen2
+
1
,
&
value3
,
&
vlen3
);
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
if
(
vlen3
!=
0
)
value3
[
vlen3
]
=
0
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_APOLLO_URL
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
if
(
strcasecmp
(
name
,
"dataDir"
)
==
0
)
{
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_APOLLO_URL
);
code
=
cfgSetTfsItem
(
pConfig
,
name
,
value
,
value2
,
value3
,
CFG_STYPE_APOLLO_URL
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
code
=
cfgSetItem
(
pConfig
,
name
,
value
,
CFG_STYPE_APOLLO_URL
);
if
(
code
!=
0
&&
terrno
!=
TSDB_CODE_CFG_NOT_FOUND
)
break
;
}
}
}
}
tjsonDelete
(
pJson
);
tjsonDelete
(
pJson
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录