Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
11653686
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看板
提交
11653686
编写于
4月 02, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
retentions param bug fix and deliver to vnode
上级
d5205830
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
6 deletion
+14
-6
source/common/src/tmsg.c
source/common/src/tmsg.c
+3
-3
source/dnode/mgmt/vm/src/vmMsg.c
source/dnode/mgmt/vm/src/vmMsg.c
+5
-0
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+2
-1
source/dnode/vnode/inc/tsdb.h
source/dnode/vnode/inc/tsdb.h
+2
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-1
未找到文件。
source/common/src/tmsg.c
浏览文件 @
11653686
...
...
@@ -367,7 +367,7 @@ void *tDeserializeSVCreateTbReq(void *buf, SVCreateTbReq *pReq) {
buf
=
taosDecodeFixedI16
(
buf
,
&
(
pReq
->
stbCfg
.
nCols
));
buf
=
taosDecodeFixedI16
(
buf
,
&
(
pReq
->
stbCfg
.
nBSmaCols
));
pReq
->
stbCfg
.
pSchema
=
(
SSchemaEx
*
)
taosMemoryMalloc
(
pReq
->
stbCfg
.
nCols
*
sizeof
(
SSchemaEx
));
for
(
col_id_t
i
=
0
;
i
<
pReq
->
stbCfg
.
nCols
;
i
++
)
{
for
(
col_id_t
i
=
0
;
i
<
pReq
->
stbCfg
.
nCols
;
++
i
)
{
buf
=
taosDecodeFixedI8
(
buf
,
&
(
pReq
->
stbCfg
.
pSchema
[
i
].
type
));
buf
=
taosDecodeFixedI8
(
buf
,
&
(
pReq
->
stbCfg
.
pSchema
[
i
].
sma
));
buf
=
taosDecodeFixedI16
(
buf
,
&
(
pReq
->
stbCfg
.
pSchema
[
i
].
colId
));
...
...
@@ -376,7 +376,7 @@ void *tDeserializeSVCreateTbReq(void *buf, SVCreateTbReq *pReq) {
}
buf
=
taosDecodeFixedI16
(
buf
,
&
pReq
->
stbCfg
.
nTagCols
);
pReq
->
stbCfg
.
pTagSchema
=
(
SSchema
*
)
taosMemoryMalloc
(
pReq
->
stbCfg
.
nTagCols
*
sizeof
(
SSchema
));
for
(
col_id_t
i
=
0
;
i
<
pReq
->
stbCfg
.
nTagCols
;
i
++
)
{
for
(
col_id_t
i
=
0
;
i
<
pReq
->
stbCfg
.
nTagCols
;
++
i
)
{
buf
=
taosDecodeFixedI8
(
buf
,
&
(
pReq
->
stbCfg
.
pTagSchema
[
i
].
type
));
buf
=
taosDecodeFixedI16
(
buf
,
&
pReq
->
stbCfg
.
pTagSchema
[
i
].
colId
);
buf
=
taosDecodeFixedI32
(
buf
,
&
pReq
->
stbCfg
.
pTagSchema
[
i
].
bytes
);
...
...
@@ -408,7 +408,7 @@ void *tDeserializeSVCreateTbReq(void *buf, SVCreateTbReq *pReq) {
buf
=
taosDecodeFixedI16
(
buf
,
&
pReq
->
ntbCfg
.
nCols
);
buf
=
taosDecodeFixedI16
(
buf
,
&
(
pReq
->
ntbCfg
.
nBSmaCols
));
pReq
->
ntbCfg
.
pSchema
=
(
SSchemaEx
*
)
taosMemoryMalloc
(
pReq
->
ntbCfg
.
nCols
*
sizeof
(
SSchemaEx
));
for
(
col_id_t
i
=
0
;
i
<
pReq
->
ntbCfg
.
nCols
;
i
++
)
{
for
(
col_id_t
i
=
0
;
i
<
pReq
->
ntbCfg
.
nCols
;
++
i
)
{
buf
=
taosDecodeFixedI8
(
buf
,
&
pReq
->
ntbCfg
.
pSchema
[
i
].
type
);
buf
=
taosDecodeFixedI8
(
buf
,
&
pReq
->
ntbCfg
.
pSchema
[
i
].
sma
);
buf
=
taosDecodeFixedI16
(
buf
,
&
pReq
->
ntbCfg
.
pSchema
[
i
].
colId
);
...
...
source/dnode/mgmt/vm/src/vmMsg.c
浏览文件 @
11653686
...
...
@@ -30,6 +30,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg
->
tsdbCfg
.
keep1
=
pCreate
->
daysToKeep2
;
pCfg
->
tsdbCfg
.
keep2
=
pCreate
->
daysToKeep0
;
pCfg
->
tsdbCfg
.
lruCacheSize
=
pCreate
->
cacheBlockSize
;
pCfg
->
tsdbCfg
.
retentions
=
pCreate
->
pRetensions
;
pCfg
->
metaCfg
.
lruSize
=
pCreate
->
cacheBlockSize
;
pCfg
->
walCfg
.
fsyncPeriod
=
pCreate
->
fsyncPeriod
;
pCfg
->
walCfg
.
level
=
pCreate
->
walLevel
;
...
...
@@ -70,6 +71,7 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) {
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
createReq
.
vgId
);
if
(
pVnode
!=
NULL
)
{
tFreeSCreateVnodeReq
(
&
createReq
);
dDebug
(
"vgId:%d, already exist"
,
createReq
.
vgId
);
vmReleaseVnode
(
pMgmt
,
pVnode
);
terrno
=
TSDB_CODE_DND_VNODE_ALREADY_DEPLOYED
;
...
...
@@ -88,12 +90,14 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) {
vnodeCfg
.
dbId
=
wrapperCfg
.
dbUid
;
SVnode
*
pImpl
=
vnodeOpen
(
wrapperCfg
.
path
,
&
vnodeCfg
);
if
(
pImpl
==
NULL
)
{
tFreeSCreateVnodeReq
(
&
createReq
);
dError
(
"vgId:%d, failed to create vnode since %s"
,
createReq
.
vgId
,
terrstr
());
return
-
1
;
}
int32_t
code
=
vmOpenVnode
(
pMgmt
,
&
wrapperCfg
,
pImpl
);
if
(
code
!=
0
)
{
tFreeSCreateVnodeReq
(
&
createReq
);
dError
(
"vgId:%d, failed to open vnode since %s"
,
createReq
.
vgId
,
terrstr
());
vnodeClose
(
pImpl
);
vnodeDestroy
(
wrapperCfg
.
path
);
...
...
@@ -103,6 +107,7 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) {
code
=
vmWriteVnodesToFile
(
pMgmt
);
if
(
code
!=
0
)
{
tFreeSCreateVnodeReq
(
&
createReq
);
vnodeClose
(
pImpl
);
vnodeDestroy
(
wrapperCfg
.
path
);
terrno
=
code
;
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
11653686
...
...
@@ -69,7 +69,8 @@ void mndCleanupDb(SMnode *pMnode) {}
static
SSdbRaw
*
mndDbActionEncode
(
SDbObj
*
pDb
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_DB
,
TSDB_DB_VER_NUMBER
,
sizeof
(
SDbObj
)
+
TSDB_DB_RESERVE_SIZE
);
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_DB
,
TSDB_DB_VER_NUMBER
,
sizeof
(
SDbObj
)
+
pDb
->
cfg
.
numOfRetensions
*
sizeof
(
SRetention
)
+
TSDB_DB_RESERVE_SIZE
);
if
(
pRaw
==
NULL
)
goto
DB_ENCODE_OVER
;
int32_t
dataPos
=
0
;
...
...
source/dnode/vnode/inc/tsdb.h
浏览文件 @
11653686
...
...
@@ -55,13 +55,14 @@ typedef struct STsdbCfg {
int8_t
precision
;
int8_t
update
;
int8_t
compression
;
uint64_t
lruCacheSize
;
int32_t
daysPerFile
;
int32_t
minRowsPerFileBlock
;
int32_t
maxRowsPerFileBlock
;
int32_t
keep
;
int32_t
keep1
;
int32_t
keep2
;
uint64_t
lruCacheSize
;
SArray
*
retentions
;
}
STsdbCfg
;
// query condition to build multi-table data block iterator
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
11653686
...
...
@@ -938,7 +938,7 @@ static int32_t buildCreateDbRetentions(const SNodeList* pRetentions, SCreateDbRe
SNode
*
pNode
=
NULL
;
int32_t
index
=
0
;
FOREACH
(
pNode
,
pRetentions
)
{
if
(
0
==
index
%
2
)
{
if
(
0
==
((
index
++
)
&
1
)
)
{
pFreq
=
(
SValueNode
*
)
pNode
;
}
else
{
pKeep
=
(
SValueNode
*
)
pNode
;
...
...
@@ -951,6 +951,7 @@ static int32_t buildCreateDbRetentions(const SNodeList* pRetentions, SCreateDbRe
taosArrayPush
(
pReq
->
pRetensions
,
&
retention
);
}
}
pReq
->
numOfRetensions
=
taosArrayGetSize
(
pReq
->
pRetensions
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录