Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
851f6df0
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看板
提交
851f6df0
编写于
7月 06, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh(tsdb): opt perf.
上级
aeb94733
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
source/dnode/vnode/src/tsdb/tsdbRead2.c
source/dnode/vnode/src/tsdb/tsdbRead2.c
+13
-13
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead2.c
浏览文件 @
851f6df0
...
...
@@ -997,18 +997,18 @@ void clearBrinBlockIter(SBrinRecordIter* pIter) {
static
int32_t
doLoadFileBlock
(
STsdbReader
*
pReader
,
SArray
*
pIndexList
,
SBlockNumber
*
pBlockNum
,
SArray
*
pTableScanInfoList
)
{
size_t
sizeInDisk
=
0
;
int64_t
st
=
taosGetTimestampUs
();
cleanupTableScanInfo
(
&
pReader
->
status
);
// set the flag for the new file
int32_t
k
=
0
;
int32_t
numOfTables
=
tSimpleHashGetSize
(
pReader
->
status
.
pTableMap
);
// clear info for the new file
cleanupTableScanInfo
(
&
pReader
->
status
);
int32_t
step
=
ASCENDING_TRAVERSE
(
pReader
->
order
)
?
1
:
-
1
;
STimeWindow
w
=
pReader
->
window
;
int32_t
k
=
0
;
int32_t
numOfTables
=
tSimpleHashGetSize
(
pReader
->
status
.
pTableMap
);
int32_t
step
=
ASCENDING_TRAVERSE
(
pReader
->
order
)
?
1
:
-
1
;
STimeWindow
w
=
pReader
->
window
;
SBrinRecord
*
pRecord
=
NULL
;
SBrinRecordIter
iter
=
{
0
};
initBrinRecordIter
(
&
iter
,
pReader
->
pFileReader
,
pIndexList
);
SBrinRecord
*
pRecord
=
NULL
;
while
(
k
<
numOfTables
)
{
pRecord
=
getNextBrinRecord
(
&
iter
);
...
...
@@ -1138,7 +1138,7 @@ static int32_t doCopyColVal(SColumnInfoData* pColInfoData, int32_t rowIndex, int
}
static
SFileDataBlockInfo
*
getCurrentBlockInfo
(
SDataBlockIter
*
pBlockIter
)
{
size_t
num
=
taosArrayGetSize
(
pBlockIter
->
blockList
);
size_t
num
=
TARRAY_SIZE
(
pBlockIter
->
blockList
);
if
(
num
==
0
)
{
ASSERT
(
pBlockIter
->
numOfBlocks
==
num
);
return
NULL
;
...
...
@@ -1669,7 +1669,7 @@ static int32_t initBlockIterator(STsdbReader* pReader, SDataBlockIter* pBlockIte
for
(
int32_t
i
=
0
;
i
<
numOfTables
;
++
i
)
{
STableBlockScanInfo
*
pTableScanInfo
=
taosArrayGetP
(
pTableList
,
i
);
ASSERT
(
pTableScanInfo
->
pBlockList
!=
NULL
&&
taosArrayGetSize
(
pTableScanInfo
->
pBlockList
)
>
0
);
//
ASSERT(pTableScanInfo->pBlockList != NULL && taosArrayGetSize(pTableScanInfo->pBlockList) > 0);
size_t
num
=
taosArrayGetSize
(
pTableScanInfo
->
pBlockList
);
sup
.
numOfBlocksPerTable
[
sup
.
numOfTables
]
=
num
;
...
...
@@ -3251,7 +3251,7 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, int32_t orde
int32_t
code
=
0
;
int32_t
newDelDataInFile
=
taosArrayGetSize
(
pBlockScanInfo
->
pfileDelData
);
if
(
newDelDataInFile
==
0
&&
((
pBlockScanInfo
->
delSkyline
!=
NULL
)
||
(
taosArrayGetSize
(
pBlockScanInfo
->
pMemDelData
)
==
0
)))
{
((
pBlockScanInfo
->
delSkyline
!=
NULL
)
||
(
TARRAY_SIZE
(
pBlockScanInfo
->
pMemDelData
)
==
0
)))
{
return
code
;
}
...
...
@@ -5332,7 +5332,7 @@ int32_t tsdbRetrieveDatablockSMA2(STsdbReader* pReader, SSDataBlock* pDataBlock,
return
TSDB_CODE_SUCCESS
;
}
int64_t
st
=
taosGetTimestampUs
();
//
int64_t st = taosGetTimestampUs();
TARRAY2_CLEAR
(
&
pSup
->
colAggArray
,
0
);
code
=
tsdbDataFileReadBlockSma
(
pReader
->
pFileReader
,
&
pFBlock
->
record
,
&
pSup
->
colAggArray
);
...
...
@@ -5389,8 +5389,8 @@ int32_t tsdbRetrieveDatablockSMA2(STsdbReader* pReader, SSDataBlock* pDataBlock,
*
pBlockSMA
=
pResBlock
->
pBlockAgg
;
pReader
->
cost
.
smaDataLoad
+=
1
;
double
elapsedTime
=
(
taosGetTimestampUs
()
-
st
)
/
1000
.
0
;
pReader
->
cost
.
smaLoadTime
+=
elapsedTime
;
//
double elapsedTime = (taosGetTimestampUs() - st) / 1000.0;
pReader
->
cost
.
smaLoadTime
+=
0
;
//
elapsedTime;
tsdbDebug
(
"vgId:%d, succeed to load block SMA for uid %"
PRIu64
", %s"
,
0
,
pFBlock
->
uid
,
pReader
->
idStr
);
return
code
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录