Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a90354cd
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
a90354cd
编写于
3月 29, 2023
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: restore debug code
上级
8b7622b5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
38 deletion
+1
-38
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-38
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
a90354cd
...
@@ -3064,9 +3064,6 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
...
@@ -3064,9 +3064,6 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
TSDBKEY
keyInBuf
=
getCurrentKeyInBuf
(
pScanInfo
,
pReader
);
TSDBKEY
keyInBuf
=
getCurrentKeyInBuf
(
pScanInfo
,
pReader
);
if
(
fileBlockShouldLoad
(
pReader
,
pBlockInfo
,
pBlock
,
pScanInfo
,
keyInBuf
,
pLastBlockReader
))
{
if
(
fileBlockShouldLoad
(
pReader
,
pBlockInfo
,
pBlock
,
pScanInfo
,
keyInBuf
,
pLastBlockReader
))
{
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
&&
pReader
->
rowsNum
>
0
)
{
return
code
;
}
code
=
doLoadFileBlockData
(
pReader
,
pBlockIter
,
&
pStatus
->
fileBlockData
,
pScanInfo
->
uid
);
code
=
doLoadFileBlockData
(
pReader
,
pBlockIter
,
&
pStatus
->
fileBlockData
,
pScanInfo
->
uid
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
return
code
;
...
@@ -3075,19 +3072,12 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
...
@@ -3075,19 +3072,12 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
// build composed data block
// build composed data block
code
=
buildComposedDataBlock
(
pReader
);
code
=
buildComposedDataBlock
(
pReader
);
}
else
if
(
bufferDataInFileBlockGap
(
pReader
->
order
,
keyInBuf
,
pBlock
))
{
}
else
if
(
bufferDataInFileBlockGap
(
pReader
->
order
,
keyInBuf
,
pBlock
))
{
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
&&
pReader
->
rowsNum
>
0
)
{
return
code
;
}
// data in memory that are earlier than current file block
// data in memory that are earlier than current file block
// rows in buffer should be less than the file block in asc, greater than file block in desc
// rows in buffer should be less than the file block in asc, greater than file block in desc
int64_t
endKey
=
(
ASCENDING_TRAVERSE
(
pReader
->
order
))
?
pBlock
->
minKey
.
ts
:
pBlock
->
maxKey
.
ts
;
int64_t
endKey
=
(
ASCENDING_TRAVERSE
(
pReader
->
order
))
?
pBlock
->
minKey
.
ts
:
pBlock
->
maxKey
.
ts
;
code
=
buildDataBlockFromBuf
(
pReader
,
pScanInfo
,
endKey
);
code
=
buildDataBlockFromBuf
(
pReader
,
pScanInfo
,
endKey
);
}
else
{
}
else
{
if
(
hasDataInLastBlock
(
pLastBlockReader
)
&&
!
ASCENDING_TRAVERSE
(
pReader
->
order
))
{
if
(
hasDataInLastBlock
(
pLastBlockReader
)
&&
!
ASCENDING_TRAVERSE
(
pReader
->
order
))
{
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
&&
pReader
->
rowsNum
>
0
)
{
return
code
;
}
// only return the rows in last block
// only return the rows in last block
int64_t
tsLast
=
getCurrentKeyInLastBlock
(
pLastBlockReader
);
int64_t
tsLast
=
getCurrentKeyInLastBlock
(
pLastBlockReader
);
ASSERT
(
tsLast
>=
pBlock
->
maxKey
.
ts
);
ASSERT
(
tsLast
>=
pBlock
->
maxKey
.
ts
);
...
@@ -3437,12 +3427,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
...
@@ -3437,12 +3427,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
initBlockDumpInfo
(
pReader
,
pBlockIter
);
initBlockDumpInfo
(
pReader
,
pBlockIter
);
}
else
{
}
else
{
if
(
pReader
->
status
.
pCurrentFileset
->
nSttF
>
0
)
{
if
(
pReader
->
status
.
pCurrentFileset
->
nSttF
>
0
)
{
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
&&
pReader
->
rowsNum
>
0
)
{
pReader
->
pResBlock
->
info
.
rows
=
pReader
->
rowsNum
;
pReader
->
rowsNum
=
0
;
return
TSDB_CODE_SUCCESS
;
}
// data blocks in current file are exhausted, let's try the next file now
// data blocks in current file are exhausted, let's try the next file now
SBlockData
*
pBlockData
=
&
pReader
->
status
.
fileBlockData
;
SBlockData
*
pBlockData
=
&
pReader
->
status
.
fileBlockData
;
if
(
pBlockData
->
uid
!=
0
)
{
if
(
pBlockData
->
uid
!=
0
)
{
...
@@ -3457,17 +3441,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
...
@@ -3457,17 +3441,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
code
=
initForFirstBlockInFile
(
pReader
,
pBlockIter
);
code
=
initForFirstBlockInFile
(
pReader
,
pBlockIter
);
// error happens or all the data files are completely checked
// error happens or all the data files are completely checked
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
((
code
!=
TSDB_CODE_SUCCESS
)
||
(
pReader
->
status
.
loadFromFile
==
false
))
{
return
code
;
}
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
&&
pReader
->
rowsNum
>
0
)
{
pReader
->
pResBlock
->
info
.
rows
=
pReader
->
rowsNum
;
pReader
->
rowsNum
=
0
;
return
TSDB_CODE_SUCCESS
;
}
if
(
pReader
->
status
.
loadFromFile
==
false
)
{
return
code
;
return
code
;
}
}
...
@@ -3481,17 +3455,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
...
@@ -3481,17 +3455,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
}
}
code
=
doBuildDataBlock
(
pReader
);
code
=
doBuildDataBlock
(
pReader
);
if
(
READ_MODE_COUNT_ONLY
==
pReader
->
readMode
)
{
if
(
false
==
pReader
->
status
.
composedDataBlock
&&
pDumpInfo
->
allDumped
)
{
pReader
->
rowsNum
+=
pReader
->
pResBlock
->
info
.
rows
;
pReader
->
pResBlock
->
info
.
rows
=
0
;
continue
;
}
else
if
(
pReader
->
pResBlock
->
info
.
rows
==
0
&&
pReader
->
rowsNum
>
0
)
{
pReader
->
pResBlock
->
info
.
rows
=
pReader
->
rowsNum
;
pReader
->
rowsNum
=
0
;
return
TSDB_CODE_SUCCESS
;
}
}
}
}
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录