Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
aa266dea
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看板
提交
aa266dea
编写于
4月 15, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact vnode
上级
83c8be30
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
18 addition
and
18 deletion
+18
-18
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+2
-2
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+3
-3
source/dnode/vnode/src/tsdb/tsdbFS.c
source/dnode/vnode/src/tsdb/tsdbFS.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbMemTable.c
source/dnode/vnode/src/tsdb/tsdbMemTable.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbOptions.c
source/dnode/vnode/src/tsdb/tsdbOptions.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-1
source/dnode/vnode/src/vnd/vnodeCommit.c
source/dnode/vnode/src/vnd/vnodeCommit.c
+6
-6
未找到文件。
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
aa266dea
...
...
@@ -91,9 +91,9 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg
->
keep
=
pCreate
->
daysToKeep0
;
pCfg
->
streamMode
=
pCreate
->
streamMode
;
pCfg
->
isWeak
=
true
;
pCfg
->
tsdbCfg
.
keep
=
pCreate
->
daysToKeep0
;
pCfg
->
tsdbCfg
.
keep1
=
pCreate
->
daysToKeep2
;
pCfg
->
tsdbCfg
.
keep2
=
pCreate
->
daysToKeep0
;
pCfg
->
tsdbCfg
.
keep0
=
pCreate
->
daysToKeep2
;
pCfg
->
tsdbCfg
.
keep1
=
pCreate
->
daysToKeep0
;
pCfg
->
tsdbCfg
.
lruCacheSize
=
pCreate
->
cacheBlockSize
;
pCfg
->
tsdbCfg
.
retentions
=
pCreate
->
pRetensions
;
pCfg
->
metaCfg
.
lruSize
=
pCreate
->
cacheBlockSize
;
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
aa266dea
...
...
@@ -127,9 +127,9 @@ struct STsdbCfg {
int32_t
days
;
int32_t
minRows
;
int32_t
maxRows
;
int32_t
keep
;
int32_t
keep1
;
int32_t
keep2
;
int32_t
keep0
;
int32_t
keep1
;
uint64_t
lruCacheSize
;
SArray
*
retentions
;
};
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
aa266dea
...
...
@@ -217,9 +217,9 @@ void tsdbGetRtnSnap(STsdb *pRepo, SRtn *pRtn) {
TSKEY
minKey
,
midKey
,
maxKey
,
now
;
now
=
taosGetTimestamp
(
pCfg
->
precision
);
minKey
=
now
-
pCfg
->
keep
*
tsTickPerDay
[
pCfg
->
precision
];
midKey
=
now
-
pCfg
->
keep
2
*
tsTickPerDay
[
pCfg
->
precision
];
maxKey
=
now
-
pCfg
->
keep
1
*
tsTickPerDay
[
pCfg
->
precision
];
minKey
=
now
-
pCfg
->
keep
2
*
tsTickPerDay
[
pCfg
->
precision
];
midKey
=
now
-
pCfg
->
keep
1
*
tsTickPerDay
[
pCfg
->
precision
];
maxKey
=
now
-
pCfg
->
keep
0
*
tsTickPerDay
[
pCfg
->
precision
];
pRtn
->
minKey
=
minKey
;
pRtn
->
minFid
=
(
int
)(
TSDB_KEY_FID
(
minKey
,
pCfg
->
days
,
pCfg
->
precision
));
...
...
source/dnode/vnode/src/tsdb/tsdbFS.c
浏览文件 @
aa266dea
...
...
@@ -190,7 +190,7 @@ static int tsdbAddDFileSetToStatus(SFSStatus *pStatus, const SDFileSet *pSet) {
// ================== STsdbFS
STsdbFS
*
tsdbNewFS
(
const
STsdbCfg
*
pCfg
)
{
int
keep
=
pCfg
->
keep
;
int
keep
=
pCfg
->
keep
2
;
int
days
=
pCfg
->
days
;
int
maxFSet
=
TSDB_MAX_FSETS
(
keep
,
days
);
STsdbFS
*
pfs
;
...
...
source/dnode/vnode/src/tsdb/tsdbMemTable.c
浏览文件 @
aa266dea
...
...
@@ -263,7 +263,7 @@ static int tsdbScanAndConvertSubmitMsg(STsdb *pTsdb, SSubmitReq *pMsg) {
SSubmitBlkIter
blkIter
=
{
0
};
STSRow
*
row
=
NULL
;
TSKEY
now
=
taosGetTimestamp
(
pTsdb
->
config
.
precision
);
TSKEY
minKey
=
now
-
tsTickPerDay
[
pTsdb
->
config
.
precision
]
*
pTsdb
->
config
.
keep
;
TSKEY
minKey
=
now
-
tsTickPerDay
[
pTsdb
->
config
.
precision
]
*
pTsdb
->
config
.
keep
2
;
TSKEY
maxKey
=
now
+
tsTickPerDay
[
pTsdb
->
config
.
precision
]
*
pTsdb
->
config
.
days
;
terrno
=
TSDB_CODE_SUCCESS
;
...
...
source/dnode/vnode/src/tsdb/tsdbOptions.c
浏览文件 @
aa266dea
...
...
@@ -20,9 +20,9 @@ const STsdbCfg defautlTsdbOptions = {.precision = 0,
.
days
=
10
,
.
minRows
=
100
,
.
maxRows
=
4096
,
.
keep
=
3650
,
.
keep1
=
3650
,
.
keep2
=
3650
,
.
keep0
=
3650
,
.
keep1
=
3650
,
.
update
=
0
,
.
compression
=
TWO_STAGE_COMP
};
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
aa266dea
...
...
@@ -314,7 +314,7 @@ static int64_t getEarliestValidTimestamp(STsdb* pTsdb) {
STsdbCfg
*
pCfg
=
&
pTsdb
->
config
;
int64_t
now
=
taosGetTimestamp
(
pCfg
->
precision
);
return
now
-
(
tsTickPerDay
[
pCfg
->
precision
]
*
pCfg
->
keep
)
+
1
;
// needs to add one tick
return
now
-
(
tsTickPerDay
[
pCfg
->
precision
]
*
pCfg
->
keep
2
)
+
1
;
// needs to add one tick
}
static
void
setQueryTimewindow
(
STsdbReadHandle
*
pTsdbReadHandle
,
STsdbQueryCond
*
pCond
)
{
...
...
source/dnode/vnode/src/vnd/vnodeCommit.c
浏览文件 @
aa266dea
...
...
@@ -154,9 +154,9 @@ static int vnodeEncodeConfig(const void *pObj, SJson *pJson) {
if
(
tjsonAddIntegerToObject
(
pJson
,
"daysPerFile"
,
pCfg
->
tsdbCfg
.
days
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"minRows"
,
pCfg
->
tsdbCfg
.
minRows
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"maxRows"
,
pCfg
->
tsdbCfg
.
maxRows
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep0"
,
pCfg
->
tsdbCfg
.
keep
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep1"
,
pCfg
->
tsdbCfg
.
keep
1
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep2"
,
pCfg
->
tsdbCfg
.
keep
2
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep0"
,
pCfg
->
tsdbCfg
.
keep
2
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep1"
,
pCfg
->
tsdbCfg
.
keep
0
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"keep2"
,
pCfg
->
tsdbCfg
.
keep
1
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"lruCacheSize"
,
pCfg
->
tsdbCfg
.
lruCacheSize
)
<
0
)
return
-
1
;
return
0
;
...
...
@@ -181,9 +181,9 @@ static int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
if
(
tjsonGetNumberValue
(
pJson
,
"daysPerFile"
,
pCfg
->
tsdbCfg
.
days
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"minRows"
,
pCfg
->
tsdbCfg
.
minRows
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"maxRows"
,
pCfg
->
tsdbCfg
.
maxRows
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep0"
,
pCfg
->
tsdbCfg
.
keep
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep1"
,
pCfg
->
tsdbCfg
.
keep
1
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep2"
,
pCfg
->
tsdbCfg
.
keep
2
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep0"
,
pCfg
->
tsdbCfg
.
keep
2
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep1"
,
pCfg
->
tsdbCfg
.
keep
0
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"keep2"
,
pCfg
->
tsdbCfg
.
keep
1
)
<
0
)
return
-
1
;
if
(
tjsonGetNumberValue
(
pJson
,
"lruCacheSize"
,
pCfg
->
tsdbCfg
.
lruCacheSize
)
<
0
)
return
-
1
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录