Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9c8b194c
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
9c8b194c
编写于
12月 20, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact: set FpSnapshotStopRead return type to void
上级
41dcd32b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
23 deletion
+12
-23
include/libs/sync/sync.h
include/libs/sync/sync.h
+1
-1
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+2
-2
source/dnode/mnode/sdb/inc/sdb.h
source/dnode/mnode/sdb/inc/sdb.h
+1
-1
source/dnode/mnode/sdb/src/sdbFile.c
source/dnode/mnode/sdb/src/sdbFile.c
+1
-4
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+1
-1
source/dnode/vnode/src/vnd/vnodeSnapshot.c
source/dnode/vnode/src/vnd/vnodeSnapshot.c
+2
-5
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+2
-3
source/libs/sync/src/syncSnapshot.c
source/libs/sync/src/syncSnapshot.c
+2
-6
未找到文件。
include/libs/sync/sync.h
浏览文件 @
9c8b194c
...
...
@@ -156,7 +156,7 @@ typedef struct SSyncFSM {
void
(
*
FpGetSnapshotInfo
)(
const
struct
SSyncFSM
*
pFsm
,
SSnapshot
*
pSnapshot
);
int32_t
(
*
FpSnapshotStartRead
)(
const
struct
SSyncFSM
*
pFsm
,
void
*
pReaderParam
,
void
**
ppReader
);
int32_t
(
*
FpSnapshotStopRead
)(
const
struct
SSyncFSM
*
pFsm
,
void
*
pReader
);
void
(
*
FpSnapshotStopRead
)(
const
struct
SSyncFSM
*
pFsm
,
void
*
pReader
);
int32_t
(
*
FpSnapshotDoRead
)(
const
struct
SSyncFSM
*
pFsm
,
void
*
pReader
,
void
**
ppBuf
,
int32_t
*
len
);
int32_t
(
*
FpSnapshotStartWrite
)(
const
struct
SSyncFSM
*
pFsm
,
void
*
pWriterParam
,
void
**
ppWriter
);
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
9c8b194c
...
...
@@ -169,10 +169,10 @@ int32_t mndSnapshotStartRead(const SSyncFSM *pFsm, void *pParam, void **ppReader
return
sdbStartRead
(
pMnode
->
pSdb
,
(
SSdbIter
**
)
ppReader
,
NULL
,
NULL
,
NULL
);
}
int32_t
mndSnapshotStopRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
)
{
static
void
mndSnapshotStopRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
)
{
mInfo
(
"stop to read snapshot from sdb"
);
SMnode
*
pMnode
=
pFsm
->
data
;
return
sdbStopRead
(
pMnode
->
pSdb
,
pReader
);
sdbStopRead
(
pMnode
->
pSdb
,
pReader
);
}
int32_t
mndSnapshotDoRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
,
void
**
ppBuf
,
int32_t
*
len
)
{
...
...
source/dnode/mnode/sdb/inc/sdb.h
浏览文件 @
9c8b194c
...
...
@@ -392,7 +392,7 @@ void *sdbGetRowObj(SSdbRow *pRow);
void
sdbFreeRow
(
SSdb
*
pSdb
,
SSdbRow
*
pRow
,
bool
callFunc
);
int32_t
sdbStartRead
(
SSdb
*
pSdb
,
SSdbIter
**
ppIter
,
int64_t
*
index
,
int64_t
*
term
,
int64_t
*
config
);
int32_t
sdbStopRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
);
void
sdbStopRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
);
int32_t
sdbDoRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
,
void
**
ppBuf
,
int32_t
*
len
);
int32_t
sdbStartWrite
(
SSdb
*
pSdb
,
SSdbIter
**
ppIter
);
...
...
source/dnode/mnode/sdb/src/sdbFile.c
浏览文件 @
9c8b194c
...
...
@@ -585,10 +585,7 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter, int64_t *index, int64_t *ter
return
0
;
}
int32_t
sdbStopRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
)
{
sdbCloseIter
(
pIter
);
return
0
;
}
void
sdbStopRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
)
{
sdbCloseIter
(
pIter
);
}
int32_t
sdbDoRead
(
SSdb
*
pSdb
,
SSdbIter
*
pIter
,
void
**
ppBuf
,
int32_t
*
len
)
{
int32_t
maxlen
=
4096
;
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
9c8b194c
...
...
@@ -264,7 +264,7 @@ int32_t smaGetTSmaDays(SVnodeCfg *pCfg, void *pCont, uint32_t contLen, int32_t *
// SVSnapReader
int32_t
vnodeSnapReaderOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapReader
**
ppReader
);
int32_t
vnodeSnapReaderClose
(
SVSnapReader
*
pReader
);
void
vnodeSnapReaderClose
(
SVSnapReader
*
pReader
);
int32_t
vnodeSnapRead
(
SVSnapReader
*
pReader
,
uint8_t
**
ppData
,
uint32_t
*
nData
);
// SVSnapWriter
int32_t
vnodeSnapWriterOpen
(
SVnode
*
pVnode
,
int64_t
sver
,
int64_t
ever
,
SVSnapWriter
**
ppWriter
);
...
...
source/dnode/vnode/src/vnd/vnodeSnapshot.c
浏览文件 @
9c8b194c
...
...
@@ -67,9 +67,8 @@ _err:
return
code
;
}
int32_t
vnodeSnapReaderClose
(
SVSnapReader
*
pReader
)
{
int32_t
code
=
0
;
void
vnodeSnapReaderClose
(
SVSnapReader
*
pReader
)
{
vInfo
(
"vgId:%d, close vnode snapshot reader"
,
TD_VID
(
pReader
->
pVnode
));
if
(
pReader
->
pRsmaReader
)
{
rsmaSnapReaderClose
(
&
pReader
->
pRsmaReader
);
}
...
...
@@ -82,9 +81,7 @@ int32_t vnodeSnapReaderClose(SVSnapReader *pReader) {
metaSnapReaderClose
(
&
pReader
->
pMetaReader
);
}
vInfo
(
"vgId:%d, vnode snapshot reader closed"
,
TD_VID
(
pReader
->
pVnode
));
taosMemoryFree
(
pReader
);
return
code
;
}
int32_t
vnodeSnapRead
(
SVSnapReader
*
pReader
,
uint8_t
**
ppData
,
uint32_t
*
nData
)
{
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
9c8b194c
...
...
@@ -423,10 +423,9 @@ static int32_t vnodeSnapshotStartRead(const SSyncFSM *pFsm, void *pParam, void *
return
code
;
}
static
int32_t
vnodeSnapshotStopRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
)
{
static
void
vnodeSnapshotStopRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
)
{
SVnode
*
pVnode
=
pFsm
->
data
;
int32_t
code
=
vnodeSnapReaderClose
(
pReader
);
return
code
;
vnodeSnapReaderClose
(
pReader
);
}
static
int32_t
vnodeSnapshotDoRead
(
const
SSyncFSM
*
pFsm
,
void
*
pReader
,
void
**
ppBuf
,
int32_t
*
len
)
{
...
...
source/libs/sync/src/syncSnapshot.c
浏览文件 @
9c8b194c
...
...
@@ -66,10 +66,7 @@ void snapshotSenderDestroy(SSyncSnapshotSender *pSender) {
// close reader
if
(
pSender
->
pReader
!=
NULL
)
{
int32_t
ret
=
pSender
->
pSyncNode
->
pFsm
->
FpSnapshotStopRead
(
pSender
->
pSyncNode
->
pFsm
,
pSender
->
pReader
);
if
(
ret
!=
0
)
{
sNError
(
pSender
->
pSyncNode
,
"stop reader error"
);
}
pSender
->
pSyncNode
->
pFsm
->
FpSnapshotStopRead
(
pSender
->
pSyncNode
->
pFsm
,
pSender
->
pReader
);
pSender
->
pReader
=
NULL
;
}
...
...
@@ -139,8 +136,7 @@ int32_t snapshotSenderStop(SSyncSnapshotSender *pSender, bool finish) {
// close reader
if
(
pSender
->
pReader
!=
NULL
)
{
int32_t
ret
=
pSender
->
pSyncNode
->
pFsm
->
FpSnapshotStopRead
(
pSender
->
pSyncNode
->
pFsm
,
pSender
->
pReader
);
ASSERT
(
ret
==
0
);
pSender
->
pSyncNode
->
pFsm
->
FpSnapshotStopRead
(
pSender
->
pSyncNode
->
pFsm
,
pSender
->
pReader
);
pSender
->
pReader
=
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录