Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
56913abd
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
56913abd
编写于
7月 04, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more work
上级
e34ad23c
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
27 addition
and
25 deletion
+27
-25
source/dnode/vnode/src/inc/vnodeInt.h
source/dnode/vnode/src/inc/vnodeInt.h
+2
-2
source/dnode/vnode/src/meta/metaSnapshot.c
source/dnode/vnode/src/meta/metaSnapshot.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+1
-1
source/dnode/vnode/src/vnd/vnodeSnapshot.c
source/dnode/vnode/src/vnd/vnodeSnapshot.c
+23
-21
未找到文件。
source/dnode/vnode/src/inc/vnodeInt.h
浏览文件 @
56913abd
...
@@ -109,7 +109,7 @@ STSma* metaGetSmaInfoByIndex(SMeta* pMeta, int64_t indexUid);
...
@@ -109,7 +109,7 @@ STSma* metaGetSmaInfoByIndex(SMeta* pMeta, int64_t indexUid);
STSmaWrapper
*
metaGetSmaInfoByTable
(
SMeta
*
pMeta
,
tb_uid_t
uid
,
bool
deepCopy
);
STSmaWrapper
*
metaGetSmaInfoByTable
(
SMeta
*
pMeta
,
tb_uid_t
uid
,
bool
deepCopy
);
SArray
*
metaGetSmaIdsByTable
(
SMeta
*
pMeta
,
tb_uid_t
uid
);
SArray
*
metaGetSmaIdsByTable
(
SMeta
*
pMeta
,
tb_uid_t
uid
);
SArray
*
metaGetSmaTbUids
(
SMeta
*
pMeta
);
SArray
*
metaGetSmaTbUids
(
SMeta
*
pMeta
);
int32_t
metaSnapReaderOpen
(
SMeta
*
pMeta
,
SMetaSnapReader
**
ppReader
,
int64_t
sver
,
int64_t
ev
er
);
int32_t
metaSnapReaderOpen
(
SMeta
*
pMeta
,
int64_t
sver
,
int64_t
ever
,
SMetaSnapReader
**
ppRead
er
);
int32_t
metaSnapReaderClose
(
SMetaSnapReader
*
pReader
);
int32_t
metaSnapReaderClose
(
SMetaSnapReader
*
pReader
);
int32_t
metaSnapRead
(
SMetaSnapReader
*
pReader
,
void
**
ppData
,
uint32_t
*
nData
);
int32_t
metaSnapRead
(
SMetaSnapReader
*
pReader
,
void
**
ppData
,
uint32_t
*
nData
);
void
*
metaGetIdx
(
SMeta
*
pMeta
);
void
*
metaGetIdx
(
SMeta
*
pMeta
);
...
@@ -131,7 +131,7 @@ int32_t tsdbInsertTableData(STsdb* pTsdb, int64_t version, SSubmitMsgIter* p
...
@@ -131,7 +131,7 @@ int32_t tsdbInsertTableData(STsdb* pTsdb, int64_t version, SSubmitMsgIter* p
int32_t
tsdbDeleteTableData
(
STsdb
*
pTsdb
,
int64_t
version
,
tb_uid_t
suid
,
tb_uid_t
uid
,
TSKEY
sKey
,
TSKEY
eKey
);
int32_t
tsdbDeleteTableData
(
STsdb
*
pTsdb
,
int64_t
version
,
tb_uid_t
suid
,
tb_uid_t
uid
,
TSKEY
sKey
,
TSKEY
eKey
);
STsdbReader
tsdbQueryCacheLastT
(
STsdb
*
tsdb
,
SQueryTableDataCond
*
pCond
,
STableListInfo
*
tableList
,
uint64_t
qId
,
STsdbReader
tsdbQueryCacheLastT
(
STsdb
*
tsdb
,
SQueryTableDataCond
*
pCond
,
STableListInfo
*
tableList
,
uint64_t
qId
,
void
*
pMemRef
);
void
*
pMemRef
);
int32_t
tsdbSnapReaderOpen
(
STsdb
*
pTsdb
,
STsdbSnapReader
**
ppReader
,
int64_t
sver
,
int64_t
ev
er
);
int32_t
tsdbSnapReaderOpen
(
STsdb
*
pTsdb
,
int64_t
sver
,
int64_t
ever
,
STsdbSnapReader
**
ppRead
er
);
int32_t
tsdbSnapReaderClose
(
STsdbSnapReader
*
pReader
);
int32_t
tsdbSnapReaderClose
(
STsdbSnapReader
*
pReader
);
int32_t
tsdbSnapRead
(
STsdbSnapReader
*
pReader
,
void
**
ppData
,
uint32_t
*
nData
);
int32_t
tsdbSnapRead
(
STsdbSnapReader
*
pReader
,
void
**
ppData
,
uint32_t
*
nData
);
...
...
source/dnode/vnode/src/meta/metaSnapshot.c
浏览文件 @
56913abd
...
@@ -22,7 +22,7 @@ struct SMetaSnapReader {
...
@@ -22,7 +22,7 @@ struct SMetaSnapReader {
int64_t
ever
;
int64_t
ever
;
};
};
int32_t
metaSnapReaderOpen
(
SMeta
*
pMeta
,
SMetaSnapReader
**
ppReader
,
int64_t
sver
,
int64_t
ev
er
)
{
int32_t
metaSnapReaderOpen
(
SMeta
*
pMeta
,
int64_t
sver
,
int64_t
ever
,
SMetaSnapReader
**
ppRead
er
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
int32_t
c
=
0
;
int32_t
c
=
0
;
SMetaSnapReader
*
pMetaReader
=
NULL
;
SMetaSnapReader
*
pMetaReader
=
NULL
;
...
...
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
浏览文件 @
56913abd
...
@@ -36,7 +36,7 @@ typedef struct STsdbSnapWriter {
...
@@ -36,7 +36,7 @@ typedef struct STsdbSnapWriter {
SDelFWriter
*
pDelFWriter
;
SDelFWriter
*
pDelFWriter
;
}
STsdbSnapWriter
;
}
STsdbSnapWriter
;
int32_t
tsdbSnapReaderOpen
(
STsdb
*
pTsdb
,
STsdbSnapReader
**
ppReader
,
int64_t
sver
,
int64_t
ev
er
)
{
int32_t
tsdbSnapReaderOpen
(
STsdb
*
pTsdb
,
int64_t
sver
,
int64_t
ever
,
STsdbSnapReader
**
ppRead
er
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
STsdbSnapReader
*
pReader
=
NULL
;
STsdbSnapReader
*
pReader
=
NULL
;
...
...
source/dnode/vnode/src/vnd/vnodeSnapshot.c
浏览文件 @
56913abd
...
@@ -13,8 +13,9 @@
...
@@ -13,8 +13,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include "vn
odeInt
.h"
#include "vn
d
.h"
// SVSnapReader ========================================================
struct
SVSnapReader
{
struct
SVSnapReader
{
SVnode
*
pVnode
;
SVnode
*
pVnode
;
int64_t
sver
;
int64_t
sver
;
...
@@ -29,13 +30,6 @@ struct SVSnapReader {
...
@@ -29,13 +30,6 @@ struct SVSnapReader {
int32_t
nData
;
int32_t
nData
;
};
};
struct
SVSnapWriter
{
SVnode
*
pVnode
;
int64_t
sver
;
int64_t
ever
;
};
// SVSnapReader ========================================================
int32_t
vnodeSnapReaderOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapReader
**
ppReader
)
{
int32_t
vnodeSnapReaderOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapReader
**
ppReader
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
SVSnapReader
*
pReader
=
NULL
;
SVSnapReader
*
pReader
=
NULL
;
...
@@ -49,21 +43,17 @@ int32_t vnodeSnapReaderOpen(SVnode *pVnode, int64_t sver, int64_t ever, SVSnapRe
...
@@ -49,21 +43,17 @@ int32_t vnodeSnapReaderOpen(SVnode *pVnode, int64_t sver, int64_t ever, SVSnapRe
pReader
->
sver
=
sver
;
pReader
->
sver
=
sver
;
pReader
->
ever
=
ever
;
pReader
->
ever
=
ever
;
if
(
metaSnapReaderOpen
(
pVnode
->
pMeta
,
&
pReader
->
pMetaReader
,
sver
,
ever
)
<
0
)
{
code
=
metaSnapReaderOpen
(
pVnode
->
pMeta
,
sver
,
ever
,
&
pReader
->
pMetaReader
);
taosMemoryFree
(
pReader
);
if
(
code
)
goto
_err
;
goto
_err
;
}
if
(
tsdbSnapReaderOpen
(
pVnode
->
pTsdb
,
&
pReader
->
pTsdbReader
,
sver
,
ever
)
<
0
)
{
code
=
tsdbSnapReaderOpen
(
pVnode
->
pTsdb
,
sver
,
ever
,
&
pReader
->
pTsdbReader
);
metaSnapReaderClose
(
pReader
->
pMetaReader
);
if
(
code
)
goto
_err
;
taosMemoryFree
(
pReader
);
goto
_err
;
}
*
ppReader
=
pReader
;
*
ppReader
=
pReader
;
return
code
;
return
code
;
_err:
_err:
vError
(
"vgId:%d vnode snapshot reader open failed since %s"
,
TD_VID
(
pVnode
),
tstrerror
(
code
));
*
ppReader
=
NULL
;
*
ppReader
=
NULL
;
return
code
;
return
code
;
}
}
...
@@ -72,8 +62,8 @@ int32_t vnodeSnapReaderClose(SVSnapReader *pReader) {
...
@@ -72,8 +62,8 @@ int32_t vnodeSnapReaderClose(SVSnapReader *pReader) {
int32_t
code
=
0
;
int32_t
code
=
0
;
vnodeFree
(
pReader
->
pData
);
vnodeFree
(
pReader
->
pData
);
tsdbSnapReaderClose
(
pReader
->
pTsdbReader
);
if
(
pReader
->
pTsdbReader
)
tsdbSnapReaderClose
(
pReader
->
pTsdbReader
);
metaSnapReaderClose
(
pReader
->
pMetaReader
);
if
(
pReader
->
pMetaReader
)
metaSnapReaderClose
(
pReader
->
pMetaReader
);
taosMemoryFree
(
pReader
);
taosMemoryFree
(
pReader
);
return
code
;
return
code
;
...
@@ -93,7 +83,7 @@ int32_t vnodeSnapRead(SVSnapReader *pReader, const void **ppData, uint32_t *nDat
...
@@ -93,7 +83,7 @@ int32_t vnodeSnapRead(SVSnapReader *pReader, const void **ppData, uint32_t *nDat
}
else
{
}
else
{
*
ppData
=
pReader
->
pData
;
*
ppData
=
pReader
->
pData
;
*
nData
=
pReader
->
nData
;
*
nData
=
pReader
->
nData
;
return
code
;
goto
_exit
;
}
}
}
}
...
@@ -108,15 +98,27 @@ int32_t vnodeSnapRead(SVSnapReader *pReader, const void **ppData, uint32_t *nDat
...
@@ -108,15 +98,27 @@ int32_t vnodeSnapRead(SVSnapReader *pReader, const void **ppData, uint32_t *nDat
}
else
{
}
else
{
*
ppData
=
pReader
->
pData
;
*
ppData
=
pReader
->
pData
;
*
nData
=
pReader
->
nData
;
*
nData
=
pReader
->
nData
;
return
code
;
goto
_exit
;
}
}
}
}
code
=
TSDB_CODE_VND_READ_END
;
code
=
TSDB_CODE_VND_READ_END
;
_exit:
return
code
;
_err:
vError
(
"vgId:% snapshot read failed since %s"
,
TD_VID
(
pReader
->
pVnode
),
tstrerror
(
code
));
return
code
;
return
code
;
}
}
// SVSnapWriter ========================================================
// SVSnapWriter ========================================================
struct
SVSnapWriter
{
SVnode
*
pVnode
;
int64_t
sver
;
int64_t
ever
;
};
int32_t
vnodeSnapshotWriterOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapWriter
**
ppWriter
)
{
int32_t
vnodeSnapshotWriterOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapWriter
**
ppWriter
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
SVSnapWriter
*
pWriter
=
NULL
;
SVSnapWriter
*
pWriter
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录