Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
50e76f9a
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
50e76f9a
编写于
7月 05, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feat/tsdb_refact' of
https://github.com/taosdata/TDengine
into feat/tsdb_snapshot
上级
a031500d
1145aabb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
10 deletion
+14
-10
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbCache.c
source/dnode/vnode/src/tsdb/tsdbCache.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+8
-4
未找到文件。
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
50e76f9a
...
@@ -223,13 +223,13 @@ int32_t tsdbReadBlockData(SDataFReader *pReader, SBlockIdx *pBlockIdx, SBlock *p
...
@@ -223,13 +223,13 @@ int32_t tsdbReadBlockData(SDataFReader *pReader, SBlockIdx *pBlockIdx, SBlock *p
int32_t
tsdbReadBlockSma
(
SDataFReader
*
pReader
,
SBlock
*
pBlock
,
SArray
*
aColumnDataAgg
,
uint8_t
**
ppBuf
);
int32_t
tsdbReadBlockSma
(
SDataFReader
*
pReader
,
SBlock
*
pBlock
,
SArray
*
aColumnDataAgg
,
uint8_t
**
ppBuf
);
// SDelFWriter
// SDelFWriter
int32_t
tsdbDelFWriterOpen
(
SDelFWriter
**
ppWriter
,
SDelFile
*
pFile
,
STsdb
*
pTsdb
);
int32_t
tsdbDelFWriterOpen
(
SDelFWriter
**
ppWriter
,
SDelFile
*
pFile
,
STsdb
*
pTsdb
);
int32_t
tsdbDelFWriterClose
(
SDelFWriter
*
pWriter
,
int8_t
sync
);
int32_t
tsdbDelFWriterClose
(
SDelFWriter
*
*
p
pWriter
,
int8_t
sync
);
int32_t
tsdbWriteDelData
(
SDelFWriter
*
pWriter
,
SArray
*
aDelData
,
uint8_t
**
ppBuf
,
SDelIdx
*
pDelIdx
);
int32_t
tsdbWriteDelData
(
SDelFWriter
*
pWriter
,
SArray
*
aDelData
,
uint8_t
**
ppBuf
,
SDelIdx
*
pDelIdx
);
int32_t
tsdbWriteDelIdx
(
SDelFWriter
*
pWriter
,
SArray
*
aDelIdx
,
uint8_t
**
ppBuf
);
int32_t
tsdbWriteDelIdx
(
SDelFWriter
*
pWriter
,
SArray
*
aDelIdx
,
uint8_t
**
ppBuf
);
int32_t
tsdbUpdateDelFileHdr
(
SDelFWriter
*
pWriter
);
int32_t
tsdbUpdateDelFileHdr
(
SDelFWriter
*
pWriter
);
// SDelFReader
// SDelFReader
int32_t
tsdbDelFReaderOpen
(
SDelFReader
**
ppReader
,
SDelFile
*
pFile
,
STsdb
*
pTsdb
,
uint8_t
**
ppBuf
);
int32_t
tsdbDelFReaderOpen
(
SDelFReader
**
ppReader
,
SDelFile
*
pFile
,
STsdb
*
pTsdb
,
uint8_t
**
ppBuf
);
int32_t
tsdbDelFReaderClose
(
SDelFReader
*
pReader
);
int32_t
tsdbDelFReaderClose
(
SDelFReader
*
*
p
pReader
);
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
,
uint8_t
**
ppBuf
);
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
,
uint8_t
**
ppBuf
);
int32_t
tsdbReadDelIdx
(
SDelFReader
*
pReader
,
SArray
*
aDelIdx
,
uint8_t
**
ppBuf
);
int32_t
tsdbReadDelIdx
(
SDelFReader
*
pReader
,
SArray
*
aDelIdx
,
uint8_t
**
ppBuf
);
...
...
source/dnode/vnode/src/tsdb/tsdbCache.c
浏览文件 @
50e76f9a
...
@@ -672,7 +672,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, STSRow **ppRo
...
@@ -672,7 +672,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, STSRow **ppRo
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
pDelFReader
,
&
delIdx
,
pSkyline
);
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
pDelFReader
,
&
delIdx
,
pSkyline
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
tsdbDelFReaderClose
(
pDelFReader
);
tsdbDelFReaderClose
(
&
pDelFReader
);
}
else
{
}
else
{
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
NULL
,
NULL
,
pSkyline
);
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
NULL
,
NULL
,
pSkyline
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
...
@@ -854,7 +854,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, STSRow **ppRow) {
...
@@ -854,7 +854,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, STSRow **ppRow) {
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
pDelFReader
,
&
delIdx
,
pSkyline
);
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
pDelFReader
,
&
delIdx
,
pSkyline
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
tsdbDelFReaderClose
(
pDelFReader
);
tsdbDelFReaderClose
(
&
pDelFReader
);
}
else
{
}
else
{
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
NULL
,
NULL
,
pSkyline
);
code
=
getTableDelSkyline
(
pMem
,
pIMem
,
NULL
,
NULL
,
pSkyline
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
50e76f9a
...
@@ -231,11 +231,11 @@ static int32_t tsdbCommitDelEnd(SCommitter *pCommitter) {
...
@@ -231,11 +231,11 @@ static int32_t tsdbCommitDelEnd(SCommitter *pCommitter) {
code
=
tsdbFSStateUpsertDelFile
(
pTsdb
->
fs
->
nState
,
&
pCommitter
->
pDelFWriter
->
fDel
);
code
=
tsdbFSStateUpsertDelFile
(
pTsdb
->
fs
->
nState
,
&
pCommitter
->
pDelFWriter
->
fDel
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
code
=
tsdbDelFWriterClose
(
pCommitter
->
pDelFWriter
,
1
);
code
=
tsdbDelFWriterClose
(
&
pCommitter
->
pDelFWriter
,
1
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
if
(
pCommitter
->
pDelFReader
)
{
if
(
pCommitter
->
pDelFReader
)
{
code
=
tsdbDelFReaderClose
(
pCommitter
->
pDelFReader
);
code
=
tsdbDelFReaderClose
(
&
pCommitter
->
pDelFReader
);
if
(
code
)
goto
_err
;
if
(
code
)
goto
_err
;
}
}
...
...
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
50e76f9a
...
@@ -60,8 +60,9 @@ _err:
...
@@ -60,8 +60,9 @@ _err:
return
code
;
return
code
;
}
}
int32_t
tsdbDelFWriterClose
(
SDelFWriter
*
pWriter
,
int8_t
sync
)
{
int32_t
tsdbDelFWriterClose
(
SDelFWriter
**
ppWriter
,
int8_t
sync
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
SDelFWriter
*
pWriter
=
*
ppWriter
;
// sync
// sync
if
(
sync
&&
taosFsyncFile
(
pWriter
->
pWriteH
)
<
0
)
{
if
(
sync
&&
taosFsyncFile
(
pWriter
->
pWriteH
)
<
0
)
{
...
@@ -75,6 +76,7 @@ int32_t tsdbDelFWriterClose(SDelFWriter *pWriter, int8_t sync) {
...
@@ -75,6 +76,7 @@ int32_t tsdbDelFWriterClose(SDelFWriter *pWriter, int8_t sync) {
goto
_err
;
goto
_err
;
}
}
*
ppWriter
=
NULL
;
return
code
;
return
code
;
_err:
_err:
...
@@ -286,8 +288,9 @@ _err:
...
@@ -286,8 +288,9 @@ _err:
return
code
;
return
code
;
}
}
int32_t
tsdbDelFReaderClose
(
SDelFReader
*
pReader
)
{
int32_t
tsdbDelFReaderClose
(
SDelFReader
**
ppReader
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
SDelFReader
*
pReader
=
*
ppReader
;
if
(
pReader
)
{
if
(
pReader
)
{
if
(
taosCloseFile
(
&
pReader
->
pReadH
)
<
0
)
{
if
(
taosCloseFile
(
&
pReader
->
pReadH
)
<
0
)
{
...
@@ -296,6 +299,7 @@ int32_t tsdbDelFReaderClose(SDelFReader *pReader) {
...
@@ -296,6 +299,7 @@ int32_t tsdbDelFReaderClose(SDelFReader *pReader) {
}
}
taosMemoryFree
(
pReader
);
taosMemoryFree
(
pReader
);
}
}
*
ppReader
=
NULL
;
_exit:
_exit:
return
code
;
return
code
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录