Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yiicenne
TDengine
提交
a9597ccb
TDengine
项目概览
yiicenne
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a9597ccb
编写于
6月 07, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support upgrade from low version
上级
0491aa97
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
4 deletion
+15
-4
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+12
-1
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+3
-3
未找到文件。
src/mnode/src/mnodeDb.c
浏览文件 @
a9597ccb
...
...
@@ -778,7 +778,11 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
tmp
[
128
]
=
{
0
};
sprintf
(
tmp
,
"%d,%d,%d"
,
pDb
->
cfg
.
daysToKeep0
,
pDb
->
cfg
.
daysToKeep1
,
pDb
->
cfg
.
daysToKeep2
);
if
(
pDb
->
cfg
.
daysToKeep0
>
pDb
->
cfg
.
daysToKeep1
||
pDb
->
cfg
.
daysToKeep0
>
pDb
->
cfg
.
daysToKeep2
)
{
sprintf
(
tmp
,
"%d,%d,%d"
,
pDb
->
cfg
.
daysToKeep1
,
pDb
->
cfg
.
daysToKeep2
,
pDb
->
cfg
.
daysToKeep0
);
}
else
{
sprintf
(
tmp
,
"%d,%d,%d"
,
pDb
->
cfg
.
daysToKeep0
,
pDb
->
cfg
.
daysToKeep1
,
pDb
->
cfg
.
daysToKeep2
);
}
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
tmp
,
strlen
(
tmp
));
cols
++
;
...
...
@@ -937,6 +941,13 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
terrno
=
TSDB_CODE_SUCCESS
;
if
(
pDb
->
cfg
.
daysToKeep0
>
pDb
->
cfg
.
daysToKeep1
||
pDb
->
cfg
.
daysToKeep0
>
pDb
->
cfg
.
daysToKeep2
)
{
int32_t
t
=
pDb
->
cfg
.
daysToKeep0
;
newCfg
.
daysToKeep0
=
pDb
->
cfg
.
daysToKeep1
;
newCfg
.
daysToKeep1
=
pDb
->
cfg
.
daysToKeep2
;
newCfg
.
daysToKeep2
=
t
;
}
if
(
cacheBlockSize
>
0
&&
cacheBlockSize
!=
pDb
->
cfg
.
cacheBlockSize
)
{
mError
(
"db:%s, can't alter cache option"
,
pDb
->
name
);
terrno
=
TSDB_CODE_MND_INVALID_DB_OPTION
;
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
a9597ccb
...
...
@@ -894,9 +894,9 @@ static SCreateVnodeMsg *mnodeBuildVnodeMsg(SVgObj *pVgroup) {
pCfg
->
totalBlocks
=
htonl
(
pDb
->
cfg
.
totalBlocks
);
pCfg
->
maxTables
=
htonl
(
maxTables
+
1
);
pCfg
->
daysPerFile
=
htonl
(
pDb
->
cfg
.
daysPerFile
);
pCfg
->
daysToKeep
=
htonl
(
pDb
->
cfg
.
daysToKeep2
);
//FROM DB TO VNODE MAP
pCfg
->
daysToKeep1
=
htonl
(
pDb
->
cfg
.
daysToKeep0
);
pCfg
->
daysToKeep2
=
htonl
(
pDb
->
cfg
.
daysToKeep1
);
pCfg
->
daysToKeep
=
htonl
(
pDb
->
cfg
.
daysToKeep2
);
//FROM DB TO VNODE MAP
:
pCfg
->
daysToKeep1
=
htonl
(
pDb
->
cfg
.
daysToKeep0
);
//keep0,keep1,keep2 in SQL is mapped to keep1,keep2,keep in vnode
pCfg
->
daysToKeep2
=
htonl
(
pDb
->
cfg
.
daysToKeep1
);
//user,client,mnode use keep0,keep1,keep2; vnode use keep1,keep2,keep
pCfg
->
minRowsPerFileBlock
=
htonl
(
pDb
->
cfg
.
minRowsPerFileBlock
);
pCfg
->
maxRowsPerFileBlock
=
htonl
(
pDb
->
cfg
.
maxRowsPerFileBlock
);
pCfg
->
fsyncPeriod
=
htonl
(
pDb
->
cfg
.
fsyncPeriod
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录