Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3f8118c9
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看板
未验证
提交
3f8118c9
编写于
12月 01, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
12月 01, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4397 from taosdata/feature/TD-2255
[TD-2255]<enhance>: make db options days and keep error message more …
上级
e915f8d9
c1b46153
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
7 deletion
+8
-7
src/inc/taoserror.h
src/inc/taoserror.h
+3
-0
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+5
-7
未找到文件。
src/inc/taoserror.h
浏览文件 @
3f8118c9
...
@@ -187,6 +187,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_DATABASES, 0, 0x0385, "Too many d
...
@@ -187,6 +187,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_DATABASES, 0, 0x0385, "Too many d
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_DB_IN_DROPPING
,
0
,
0x0386
,
"Database not available"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_DB_IN_DROPPING
,
0
,
0x0386
,
"Database not available"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_VGROUP_NOT_READY
,
0
,
0x0387
,
"Database unsynced"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_VGROUP_NOT_READY
,
0
,
0x0387
,
"Database unsynced"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_DB_OPTION_DAYS
,
0
,
0x0390
,
"Invalid database option: days out of range"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_DB_OPTION_KEEP
,
0
,
0x0391
,
"Invalid database option: keep >= keep2 >= keep1 >= days"
)
// dnode
// dnode
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MSG_NOT_PROCESSED
,
0
,
0x0400
,
"Message not processed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MSG_NOT_PROCESSED
,
0
,
0x0400
,
"Message not processed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_OUT_OF_MEMORY
,
0
,
0x0401
,
"Dnode out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_OUT_OF_MEMORY
,
0
,
0x0401
,
"Dnode out of memory"
)
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
3f8118c9
...
@@ -236,30 +236,28 @@ static int32_t mnodeCheckDbCfg(SDbCfg *pCfg) {
...
@@ -236,30 +236,28 @@ static int32_t mnodeCheckDbCfg(SDbCfg *pCfg) {
if
(
pCfg
->
daysPerFile
<
TSDB_MIN_DAYS_PER_FILE
||
pCfg
->
daysPerFile
>
TSDB_MAX_DAYS_PER_FILE
)
{
if
(
pCfg
->
daysPerFile
<
TSDB_MIN_DAYS_PER_FILE
||
pCfg
->
daysPerFile
>
TSDB_MAX_DAYS_PER_FILE
)
{
mError
(
"invalid db option daysPerFile:%d valid range: [%d, %d]"
,
pCfg
->
daysPerFile
,
TSDB_MIN_DAYS_PER_FILE
,
mError
(
"invalid db option daysPerFile:%d valid range: [%d, %d]"
,
pCfg
->
daysPerFile
,
TSDB_MIN_DAYS_PER_FILE
,
TSDB_MAX_DAYS_PER_FILE
);
TSDB_MAX_DAYS_PER_FILE
);
return
TSDB_CODE_MND_INVALID_DB_OPTION
;
return
TSDB_CODE_MND_INVALID_DB_OPTION
_DAYS
;
}
}
if
(
pCfg
->
daysToKeep
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep
>
TSDB_MAX_KEEP
)
{
if
(
pCfg
->
daysToKeep
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep
>
TSDB_MAX_KEEP
)
{
mError
(
"invalid db option daysToKeep:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
mError
(
"invalid db option daysToKeep:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
return
TSDB_CODE_MND_INVALID_DB_OPTION
;
return
TSDB_CODE_MND_INVALID_DB_OPTION
_KEEP
;
}
}
if
(
pCfg
->
daysToKeep
<
pCfg
->
daysPerFile
)
{
if
(
pCfg
->
daysToKeep
<
pCfg
->
daysPerFile
)
{
mError
(
"invalid db option daysToKeep:%d should larger than daysPerFile:%d"
,
pCfg
->
daysToKeep
,
pCfg
->
daysPerFile
);
mError
(
"invalid db option daysToKeep:%d should larger than daysPerFile:%d"
,
pCfg
->
daysToKeep
,
pCfg
->
daysPerFile
);
return
TSDB_CODE_MND_INVALID_DB_OPTION
;
return
TSDB_CODE_MND_INVALID_DB_OPTION
_KEEP
;
}
}
#if 0
if
(
pCfg
->
daysToKeep2
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep2
>
pCfg
->
daysToKeep
)
{
if
(
pCfg
->
daysToKeep2
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep2
>
pCfg
->
daysToKeep
)
{
mError
(
"invalid db option daysToKeep2:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep
,
TSDB_MIN_KEEP
,
pCfg
->
daysToKeep
);
mError
(
"invalid db option daysToKeep2:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep
,
TSDB_MIN_KEEP
,
pCfg
->
daysToKeep
);
return TSDB_CODE_MND_INVALID_DB_OPTION;
return
TSDB_CODE_MND_INVALID_DB_OPTION
_KEEP
;
}
}
if
(
pCfg
->
daysToKeep1
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep1
>
pCfg
->
daysToKeep2
)
{
if
(
pCfg
->
daysToKeep1
<
TSDB_MIN_KEEP
||
pCfg
->
daysToKeep1
>
pCfg
->
daysToKeep2
)
{
mError
(
"invalid db option daysToKeep1:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep1
,
TSDB_MIN_KEEP
,
pCfg
->
daysToKeep2
);
mError
(
"invalid db option daysToKeep1:%d valid range: [%d, %d]"
,
pCfg
->
daysToKeep1
,
TSDB_MIN_KEEP
,
pCfg
->
daysToKeep2
);
return TSDB_CODE_MND_INVALID_DB_OPTION;
return
TSDB_CODE_MND_INVALID_DB_OPTION
_KEEP
;
}
}
#endif
if
(
pCfg
->
maxRowsPerFileBlock
<
TSDB_MIN_MAX_ROW_FBLOCK
||
pCfg
->
maxRowsPerFileBlock
>
TSDB_MAX_MAX_ROW_FBLOCK
)
{
if
(
pCfg
->
maxRowsPerFileBlock
<
TSDB_MIN_MAX_ROW_FBLOCK
||
pCfg
->
maxRowsPerFileBlock
>
TSDB_MAX_MAX_ROW_FBLOCK
)
{
mError
(
"invalid db option maxRowsPerFileBlock:%d valid range: [%d, %d]"
,
pCfg
->
maxRowsPerFileBlock
,
mError
(
"invalid db option maxRowsPerFileBlock:%d valid range: [%d, %d]"
,
pCfg
->
maxRowsPerFileBlock
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录