Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a68b8fc4
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a68b8fc4
编写于
12月 20, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set mergeTree sst trigger to Max
上级
13bee021
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
+9
-9
未找到文件。
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
浏览文件 @
a68b8fc4
...
@@ -32,13 +32,13 @@ struct SLDataIter {
...
@@ -32,13 +32,13 @@ struct SLDataIter {
};
};
SSttBlockLoadInfo
*
tCreateLastBlockLoadInfo
(
STSchema
*
pSchema
,
int16_t
*
colList
,
int32_t
numOfCols
)
{
SSttBlockLoadInfo
*
tCreateLastBlockLoadInfo
(
STSchema
*
pSchema
,
int16_t
*
colList
,
int32_t
numOfCols
)
{
SSttBlockLoadInfo
*
pLoadInfo
=
taosMemoryCalloc
(
TSDB_
DEFAULT_STT_FILE
,
sizeof
(
SSttBlockLoadInfo
));
SSttBlockLoadInfo
*
pLoadInfo
=
taosMemoryCalloc
(
TSDB_
MAX_STT_TRIGGER
,
sizeof
(
SSttBlockLoadInfo
));
if
(
pLoadInfo
==
NULL
)
{
if
(
pLoadInfo
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
NULL
;
return
NULL
;
}
}
for
(
int32_t
i
=
0
;
i
<
TSDB_
DEFAULT_STT_FILE
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
MAX_STT_TRIGGER
;
++
i
)
{
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
...
@@ -63,7 +63,7 @@ SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList,
...
@@ -63,7 +63,7 @@ SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList,
}
}
void
resetLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
)
{
void
resetLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
DEFAULT_STT_FILE
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
MAX_STT_TRIGGER
;
++
i
)
{
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
...
@@ -77,14 +77,14 @@ void resetLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) {
...
@@ -77,14 +77,14 @@ void resetLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) {
}
}
void
getLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
,
int64_t
*
blocks
,
double
*
el
)
{
void
getLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
,
int64_t
*
blocks
,
double
*
el
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
DEFAULT_STT_FILE
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
MAX_STT_TRIGGER
;
++
i
)
{
*
el
+=
pLoadInfo
[
i
].
elapsedTime
;
*
el
+=
pLoadInfo
[
i
].
elapsedTime
;
*
blocks
+=
pLoadInfo
[
i
].
loadBlocks
;
*
blocks
+=
pLoadInfo
[
i
].
loadBlocks
;
}
}
}
}
void
*
destroyLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
)
{
void
*
destroyLastBlockLoadInfo
(
SSttBlockLoadInfo
*
pLoadInfo
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
DEFAULT_STT_FILE
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
TSDB_
MAX_STT_TRIGGER
;
++
i
)
{
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
pLoadInfo
[
i
].
currentLoadBlockIndex
=
1
;
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
0
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
pLoadInfo
[
i
].
blockIndex
[
1
]
=
-
1
;
...
@@ -154,8 +154,8 @@ static SBlockData *loadLastBlock(SLDataIter *pIter, const char *idStr) {
...
@@ -154,8 +154,8 @@ static SBlockData *loadLastBlock(SLDataIter *pIter, const char *idStr) {
tsdbDebug
(
"read last block, total load:%d, trigger by uid:%"
PRIu64
tsdbDebug
(
"read last block, total load:%d, trigger by uid:%"
PRIu64
", last file index:%d, last block index:%d, entry:%d, rows:%d, %p, elapsed time:%.2f ms, %s"
,
", last file index:%d, last block index:%d, entry:%d, rows:%d, %p, elapsed time:%.2f ms, %s"
,
pInfo
->
loadBlocks
,
pIter
->
uid
,
pIter
->
iStt
,
pIter
->
iSttBlk
,
pInfo
->
currentLoadBlockIndex
,
pBlock
->
nRow
,
pBlock
,
el
,
pInfo
->
loadBlocks
,
pIter
->
uid
,
pIter
->
iStt
,
pIter
->
iSttBlk
,
pInfo
->
currentLoadBlockIndex
,
pBlock
->
nRow
,
idStr
);
pBlock
,
el
,
idStr
);
pInfo
->
blockIndex
[
pInfo
->
currentLoadBlockIndex
]
=
pIter
->
iSttBlk
;
pInfo
->
blockIndex
[
pInfo
->
currentLoadBlockIndex
]
=
pIter
->
iSttBlk
;
tsdbDebug
(
"last block index list:%d, %d, %s"
,
pInfo
->
blockIndex
[
0
],
pInfo
->
blockIndex
[
1
],
idStr
);
tsdbDebug
(
"last block index list:%d, %d, %s"
,
pInfo
->
blockIndex
[
0
],
pInfo
->
blockIndex
[
1
],
idStr
);
...
@@ -552,9 +552,9 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead
...
@@ -552,9 +552,9 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead
}
}
pMTree
->
idStr
=
idStr
;
pMTree
->
idStr
=
idStr
;
if
(
!
pMTree
->
backward
)
{
// asc
if
(
!
pMTree
->
backward
)
{
// asc
tRBTreeCreate
(
&
pMTree
->
rbt
,
tLDataIterCmprFn
);
tRBTreeCreate
(
&
pMTree
->
rbt
,
tLDataIterCmprFn
);
}
else
{
// desc
}
else
{
// desc
tRBTreeCreate
(
&
pMTree
->
rbt
,
tLDataIterDescCmprFn
);
tRBTreeCreate
(
&
pMTree
->
rbt
,
tLDataIterDescCmprFn
);
}
}
int32_t
code
=
TSDB_CODE_SUCCESS
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录