Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
b0f7c114
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b0f7c114
编写于
7月 23, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
7月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2745 from taosdata/feature/2.0tsdb
Feature/2.0tsdb
上级
0cd94b9b
57cc4eb9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
5 deletion
+15
-5
src/tsdb/src/tsdbMemTable.c
src/tsdb/src/tsdbMemTable.c
+2
-3
src/tsdb/src/tsdbRWHelper.c
src/tsdb/src/tsdbRWHelper.c
+13
-2
未找到文件。
src/tsdb/src/tsdbMemTable.c
浏览文件 @
b0f7c114
...
...
@@ -264,13 +264,11 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
}
do
{
if
(
numOfRows
>=
maxRowsToRead
)
break
;
SDataRow
row
=
tsdbNextIterRow
(
pIter
);
if
(
row
==
NULL
)
break
;
keyNext
=
dataRowKey
(
row
);
if
(
keyNext
<
0
||
keyNext
>
maxKey
)
break
;
if
(
keyNext
>
maxKey
)
break
;
bool
keyFiltered
=
false
;
if
(
nFilterKeys
!=
0
)
{
...
...
@@ -289,6 +287,7 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
}
if
(
!
keyFiltered
)
{
if
(
numOfRows
>=
maxRowsToRead
)
break
;
if
(
pCols
)
{
if
(
pSchema
==
NULL
||
schemaVersion
(
pSchema
)
!=
dataRowVersion
(
row
))
{
pSchema
=
tsdbGetTableSchemaImpl
(
pTable
,
false
,
false
,
dataRowVersion
(
row
));
...
...
src/tsdb/src/tsdbRWHelper.c
浏览文件 @
b0f7c114
...
...
@@ -1477,6 +1477,11 @@ static int tsdbProcessAppendCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
tsdbInsertSuperBlock
(
pHelper
,
&
compBlock
,
pIdx
->
numOfBlocks
)
<
0
)
return
-
1
;
}
#ifndef NDEBUG
TSKEY
keyNext
=
tsdbNextIterKey
(
pCommitIter
->
pIter
);
ASSERT
(
keyNext
<
0
||
keyNext
>
pIdx
->
maxKey
);
#endif
return
0
;
}
...
...
@@ -1561,11 +1566,12 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
tsdbInsertSuperBlock
(
pHelper
,
&
compBlock
,
tblkIdx
)
<
0
)
return
-
1
;
tblkIdx
++
;
}
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
ASSERT
(
keyFirst
<=
blkKeyLast
);
int16_t
colId
=
0
;
if
(
tsdbLoadBlockDataCols
(
pHelper
,
pCompBlock
,
NULL
,
&
colId
,
1
)
<
0
)
return
-
1
;
ASSERT
(
pDataCols0
->
numOfRows
==
pCompBlock
->
numOfRows
);
slIter
=
*
(
pCommitIter
->
pIter
);
int
rows1
=
(
pCfg
->
maxRowsPerFileBlock
-
pCompBlock
->
numOfRows
);
...
...
@@ -1574,9 +1580,10 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
rows2
==
0
)
{
// all filtered out
*
(
pCommitIter
->
pIter
)
=
slIter
;
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
int
rows3
=
tsdbLoadDataFromCache
(
pTable
,
&
slIter
,
keyLimit
,
INT_MAX
,
NULL
,
NULL
,
0
)
+
rows2
;
ASSERT
(
rows3
>=
rows2
);
if
(
pCompBlock
->
numOfSubBlocks
<
TSDB_MAX_SUBBLOCKS
&&
rows1
>=
rows2
)
{
int
rows
=
(
rows1
>=
rows3
)
?
rows3
:
rows2
;
...
...
@@ -1588,6 +1595,8 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
return
-
1
;
if
(
tsdbAddSubBlock
(
pHelper
,
&
compBlock
,
tblkIdx
,
rowsRead
)
<
0
)
return
-
1
;
tblkIdx
++
;
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
if
(
tsdbLoadBlockData
(
pHelper
,
pCompBlock
,
NULL
)
<
0
)
return
-
1
;
int
round
=
0
;
...
...
@@ -1608,6 +1617,8 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
round
++
;
tblkIdx
++
;
}
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录