Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
71691eb7
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看板
提交
71691eb7
编写于
8月 07, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make code compile
上级
605e89b6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
42 addition
and
6 deletion
+42
-6
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+4
-0
source/dnode/vnode/src/tsdb/tsdbCache.c
source/dnode/vnode/src/tsdb/tsdbCache.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-2
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+34
-1
未找到文件。
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
71691eb7
...
...
@@ -257,6 +257,10 @@ int32_t tsdbReadBlockIdx(SDataFReader *pReader, SArray *aBlockIdx);
int32_t
tsdbReadBlock
(
SDataFReader
*
pReader
,
SBlockIdx
*
pBlockIdx
,
SMapData
*
pMapData
);
int32_t
tsdbReadBlockL
(
SDataFReader
*
pReader
,
SArray
*
aBlockL
);
int32_t
tsdbReadBlockSma
(
SDataFReader
*
pReader
,
SBlock
*
pBlock
,
SArray
*
aColumnDataAgg
);
int32_t
tsdbReadDataBlock
(
SDataFReader
*
pReader
,
SBlock
*
pBlock
,
SBlockData
*
pBlockData
,
int16_t
*
aColId
,
int32_t
nColId
);
int32_t
tsdbReadLastBlock
(
SDataFReader
*
pReader
,
SBlockL
*
pBlockL
,
SBlockData
*
pBlockData
,
int16_t
*
aColId
,
int32_t
nColId
);
#if 0
int32_t tsdbReadColData(SDataFReader *pReader, SBlockIdx *pBlockIdx, SBlock *pBlock, int16_t *aColId, int32_t nCol,
...
...
source/dnode/vnode/src/tsdb/tsdbCache.c
浏览文件 @
71691eb7
...
...
@@ -507,7 +507,7 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) {
tMapDataGetItemByIdx
(
&
state
->
blockMap
,
state
->
iBlock
,
&
block
,
tGetBlock
);
/* code = tsdbReadBlockData(state->pDataFReader, &state->blockIdx, &block, &state->blockData, NULL, NULL); */
code
=
tsdbRead
BlockData
(
state
->
pDataFReader
,
state
->
pBlockIdx
,
&
block
,
state
->
pBlockData
,
NULL
,
NULL
);
code
=
tsdbRead
DataBlock
(
state
->
pDataFReader
,
&
block
,
state
->
pBlockData
,
NULL
,
0
);
if
(
code
)
goto
_err
;
state
->
nRow
=
state
->
blockData
.
nRow
;
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
71691eb7
...
...
@@ -309,7 +309,7 @@ static int32_t tsdbCommitterNextLastRow(SCommitter *pCommitter) {
pCommitter
->
dReader
.
iBlockL
++
;
if
(
pCommitter
->
dReader
.
iBlockL
<
taosArrayGetSize
(
pCommitter
->
dReader
.
aBlockL
))
{
pCommitter
->
dReader
.
pBlockL
=
(
SBlockL
*
)
taosArrayGet
(
pCommitter
->
dReader
.
aBlockL
,
pCommitter
->
dReader
.
iBlockL
);
code
=
tsdbReadLastBlock
(
pCommitter
->
dReader
.
pReader
,
pCommitter
->
dReader
.
pBlockL
,
pBlockDatal
,
NULL
,
NULL
);
code
=
tsdbReadLastBlock
(
pCommitter
->
dReader
.
pReader
,
pCommitter
->
dReader
.
pBlockL
,
pBlockDatal
,
NULL
,
0
);
if
(
code
)
goto
_exit
;
pCommitter
->
dReader
.
iRow
=
0
;
...
...
@@ -593,7 +593,7 @@ static int32_t tsdbMergeCommitData(SCommitter *pCommitter, STbDataIter *pIter, S
SBlockData
*
pBlockDataR
=
&
pCommitter
->
dReader
.
bData
;
SBlockData
*
pBlockDataW
=
&
pCommitter
->
dWriter
.
bData
;
code
=
tsdbReadDataBlock
(
pCommitter
->
dReader
.
pReader
,
pBlock
,
pBlockDataR
,
NULL
,
NULL
);
code
=
tsdbReadDataBlock
(
pCommitter
->
dReader
.
pReader
,
pBlock
,
pBlockDataR
,
NULL
,
0
);
if
(
code
)
goto
_err
;
tBlockDataClearData
(
pBlockDataW
);
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
71691eb7
...
...
@@ -785,8 +785,7 @@ static int32_t doLoadFileBlockData(STsdbReader* pReader, SDataBlockIter* pBlockI
SFileBlockDumpInfo
*
pDumpInfo
=
&
pReader
->
status
.
fBlockDumpInfo
;
SBlockIdx
blockIdx
=
{.
suid
=
pReader
->
suid
,
.
uid
=
pBlockScanInfo
->
uid
};
int32_t
code
=
tsdbReadColData
(
pReader
->
pFileReader
,
&
blockIdx
,
pBlock
,
pSupInfo
->
colIds
,
numOfCols
,
pBlockData
,
NULL
,
NULL
);
int32_t
code
=
tsdbReadDataBlock
(
pReader
->
pFileReader
,
pBlock
,
pBlockData
,
pSupInfo
->
colIds
,
numOfCols
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
71691eb7
...
...
@@ -816,7 +816,7 @@ static int32_t tsdbReadBlockDataImpl(SDataFReader *pReader, SBlockInfo *pBlkInfo
if
(
code
)
goto
_err
;
}
}
else
{
code
=
tsdbDecmprColData
(
pt
+
blockCol
.
offset
,
&
blockCol
,
hdr
.
cmprAlg
,
hdr
.
nRow
,
pColData
,
pReader
->
pBuf2
);
code
=
tsdbDecmprColData
(
pt
+
blockCol
.
offset
,
&
blockCol
,
hdr
.
cmprAlg
,
hdr
.
nRow
,
pColData
,
&
pReader
->
pBuf2
);
if
(
code
)
goto
_err
;
}
}
...
...
@@ -829,6 +829,39 @@ _err:
return
code
;
}
int32_t
tsdbReadDataBlock
(
SDataFReader
*
pReader
,
SBlock
*
pBlock
,
SBlockData
*
pBlockData
,
int16_t
*
aColId
,
int32_t
nColId
)
{
int32_t
code
=
0
;
code
=
tsdbReadBlockDataImpl
(
pReader
,
&
pBlock
->
aSubBlock
[
0
],
0
,
aColId
,
nColId
,
pBlockData
);
if
(
code
)
goto
_err
;
for
(
int32_t
iSubBlock
=
1
;
iSubBlock
<
pBlock
->
nSubBlock
;
iSubBlock
++
)
{
// TODO
ASSERT
(
0
);
}
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb read data block failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
int32_t
tsdbReadLastBlock
(
SDataFReader
*
pReader
,
SBlockL
*
pBlockL
,
SBlockData
*
pBlockData
,
int16_t
*
aColId
,
int32_t
nColId
)
{
int32_t
code
=
0
;
code
=
tsdbReadBlockDataImpl
(
pReader
,
&
pBlockL
->
bInfo
,
1
,
aColId
,
nColId
,
pBlockData
);
if
(
code
)
goto
_err
;
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb read last block failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
#if 0
static int32_t tsdbReadBlockDataKey(SBlockData *pBlockData, SBlockInfo *pSubBlock, uint8_t *pBuf, uint8_t **ppBuf) {
int32_t code = 0;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录