Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b5f61132
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看板
提交
b5f61132
编写于
12月 14, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): add check for blockdata.
上级
473f5a36
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
5 deletion
+20
-5
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+20
-5
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
b5f61132
...
...
@@ -1157,6 +1157,8 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
setBlockAllDumped
(
pDumpInfo
,
ts
,
pReader
->
order
);
}
pBlockScanInfo
->
lastKey
=
pDumpInfo
->
lastKey
;
double
elapsedTime
=
(
taosGetTimestampUs
()
-
st
)
/
1000
.
0
;
pReader
->
cost
.
blockLoadTime
+=
elapsedTime
;
...
...
@@ -2468,7 +2470,7 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
while
(
1
)
{
bool
hasBlockData
=
false
;
{
while
(
pBlockData
->
nRow
>
0
)
{
// find the first qualified row in data block
while
(
pBlockData
->
nRow
>
0
&&
pBlockData
->
uid
==
pBlockScanInfo
->
uid
)
{
// find the first qualified row in data block
if
(
isValidFileBlockRow
(
pBlockData
,
pDumpInfo
,
pBlockScanInfo
,
pReader
))
{
hasBlockData
=
true
;
break
;
...
...
@@ -2478,10 +2480,13 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
SDataBlk
*
pBlock
=
getCurrentBlock
(
&
pReader
->
status
.
blockIter
);
if
(
pDumpInfo
->
rowIndex
>=
pBlock
->
nRow
||
pDumpInfo
->
rowIndex
<
0
)
{
int32_t
nextIndex
=
-
1
;
SBlockIndex
bIndex
=
{
0
};
bool
hasNeighbor
=
getNeighborBlockOfSameTable
(
pBlockInfo
,
pBlockScanInfo
,
&
nextIndex
,
pReader
->
order
,
&
bIndex
);
int32_t
nextIndex
=
-
1
;
bool
hasNeighbor
=
false
;
if
(
pBlockInfo
!=
NULL
)
{
hasNeighbor
=
getNeighborBlockOfSameTable
(
pBlockInfo
,
pBlockScanInfo
,
&
nextIndex
,
pReader
->
order
,
&
bIndex
);
}
if
(
!
hasNeighbor
)
{
// do nothing
setBlockAllDumped
(
pDumpInfo
,
pBlock
->
maxKey
.
ts
,
pReader
->
order
);
break
;
...
...
@@ -3021,7 +3026,12 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
}
else
{
if
(
pReader
->
status
.
pCurrentFileset
->
nSttF
>
0
)
{
// data blocks in current file are exhausted, let's try the next file now
tBlockDataReset
(
&
pReader
->
status
.
fileBlockData
);
SBlockData
*
pBlockData
=
&
pReader
->
status
.
fileBlockData
;
if
(
pBlockData
->
uid
!=
0
)
{
tBlockDataClear
(
pBlockData
);
}
tBlockDataReset
(
pBlockData
);
resetDataBlockIterator
(
pBlockIter
,
pReader
->
order
);
goto
_begin
;
}
else
{
...
...
@@ -3378,6 +3388,11 @@ int32_t doMergeRowsInFileBlocks(SBlockData* pBlockData, STableBlockScanInfo* pSc
SFileDataBlockInfo
*
pFileBlockInfo
=
getCurrentBlockInfo
(
&
pReader
->
status
.
blockIter
);
SDataBlk
*
pCurrentBlock
=
getCurrentBlock
(
&
pReader
->
status
.
blockIter
);
if
(
pFileBlockInfo
==
NULL
)
{
st
=
CHECK_FILEBLOCK_QUIT
;
break
;
}
checkForNeighborFileBlock
(
pReader
,
pScanInfo
,
pCurrentBlock
,
pFileBlockInfo
,
pMerger
,
key
,
&
st
);
if
(
st
==
CHECK_FILEBLOCK_QUIT
)
{
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录