Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
278cf9d3
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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,发现更多精彩内容 >>
提交
278cf9d3
编写于
11月 11, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact: remove sync ping and pingreply
上级
a18c731c
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
153 addition
and
154 deletion
+153
-154
include/common/tmsgdef.h
include/common/tmsgdef.h
+2
-2
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
+0
-2
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+0
-2
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
+12
-12
source/libs/sync/test/syncConfigChangeTest.cpp
source/libs/sync/test/syncConfigChangeTest.cpp
+10
-10
source/libs/sync/test/syncElectTest.cpp
source/libs/sync/test/syncElectTest.cpp
+9
-9
source/libs/sync/test/syncEnqTest.cpp
source/libs/sync/test/syncEnqTest.cpp
+9
-9
source/libs/sync/test/syncIOSendMsgTest.cpp
source/libs/sync/test/syncIOSendMsgTest.cpp
+9
-9
source/libs/sync/test/syncInitTest.cpp
source/libs/sync/test/syncInitTest.cpp
+8
-8
source/libs/sync/test/syncPingSelfTest.cpp
source/libs/sync/test/syncPingSelfTest.cpp
+8
-8
source/libs/sync/test/syncPingTimerTest.cpp
source/libs/sync/test/syncPingTimerTest.cpp
+8
-8
source/libs/sync/test/syncPingTimerTest2.cpp
source/libs/sync/test/syncPingTimerTest2.cpp
+8
-8
source/libs/sync/test/syncReplicateTest.cpp
source/libs/sync/test/syncReplicateTest.cpp
+10
-10
source/libs/sync/test/syncSnapshotTest.cpp
source/libs/sync/test/syncSnapshotTest.cpp
+8
-8
source/libs/sync/test/syncTestTool.cpp
source/libs/sync/test/syncTestTool.cpp
+10
-10
source/libs/sync/test/syncVotesGrantedTest.cpp
source/libs/sync/test/syncVotesGrantedTest.cpp
+8
-8
source/libs/sync/test/syncVotesRespondTest.cpp
source/libs/sync/test/syncVotesRespondTest.cpp
+8
-8
source/libs/sync/test/syncWriteTest.cpp
source/libs/sync/test/syncWriteTest.cpp
+8
-8
source/libs/sync/test/sync_test_lib/inc/syncIO.h
source/libs/sync/test/sync_test_lib/inc/syncIO.h
+4
-0
source/libs/sync/test/sync_test_lib/inc/syncTest.h
source/libs/sync/test/sync_test_lib/inc/syncTest.h
+0
-1
source/libs/sync/test/sync_test_lib/src/syncMainDebug.c
source/libs/sync/test/sync_test_lib/src/syncMainDebug.c
+14
-14
未找到文件。
include/common/tmsgdef.h
浏览文件 @
278cf9d3
...
@@ -250,8 +250,8 @@ enum {
...
@@ -250,8 +250,8 @@ enum {
TD_NEW_MSG_SEG
(
TDMT_SYNC_MSG
)
TD_NEW_MSG_SEG
(
TDMT_SYNC_MSG
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_TIMEOUT
,
"sync-timer"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_TIMEOUT
,
"sync-timer"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_PING
,
"sync-ping"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_PING
,
"sync-ping"
,
NULL
,
NULL
)
// no longer used
TD_DEF_MSG_TYPE
(
TDMT_SYNC_PING_REPLY
,
"sync-ping-reply"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_PING_REPLY
,
"sync-ping-reply"
,
NULL
,
NULL
)
// no longer used
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST
,
"sync-client-request"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST
,
"sync-client-request"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
"sync-client-request-batch"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
"sync-client-request-batch"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
"sync-client-request-reply"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
"sync-client-request-reply"
,
NULL
,
NULL
)
...
...
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
浏览文件 @
278cf9d3
...
@@ -183,8 +183,6 @@ SArray *mmGetMsgHandles() {
...
@@ -183,8 +183,6 @@ SArray *mmGetMsgHandles() {
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_VND_COMPACT_RSP
,
mmPutMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_VND_COMPACT_RSP
,
mmPutMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_TIMEOUT
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_TIMEOUT
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_PING
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_PING_REPLY
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
mmPutMsgToSyncQueue
,
1
)
==
NULL
)
goto
_OVER
;
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
278cf9d3
...
@@ -450,8 +450,6 @@ SArray *vmGetMsgHandles() {
...
@@ -450,8 +450,6 @@ SArray *vmGetMsgHandles() {
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_DROP_VNODE
,
vmPutMsgToMgmtQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_DROP_VNODE
,
vmPutMsgToMgmtQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_TIMEOUT
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_TIMEOUT
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_PING
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_PING_REPLY
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_BATCH
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_SYNC_CLIENT_REQUEST_REPLY
,
vmPutMsgToSyncQueue
,
0
)
==
NULL
)
goto
_OVER
;
...
...
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
浏览文件 @
278cf9d3
...
@@ -223,18 +223,18 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
...
@@ -223,18 +223,18 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncSnapshot
=
pSyncNode
->
FpOnSnapshot
;
//
gSyncIO->FpOnSyncSnapshot = pSyncNode->FpOnSnapshot;
gSyncIO
->
FpOnSyncSnapshotReply
=
pSyncNode
->
FpOnSnapshotReply
;
//
gSyncIO->FpOnSyncSnapshotReply = pSyncNode->FpOnSnapshotReply;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeRelease
(
pSyncNode
);
syncNodeRelease
(
pSyncNode
);
...
...
source/libs/sync/test/syncConfigChangeTest.cpp
浏览文件 @
278cf9d3
...
@@ -146,16 +146,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
...
@@ -146,16 +146,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeRelease
(
pSyncNode
);
syncNodeRelease
(
pSyncNode
);
...
...
source/libs/sync/test/syncElectTest.cpp
浏览文件 @
278cf9d3
...
@@ -59,15 +59,15 @@ SSyncNode* createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWa
...
@@ -59,15 +59,15 @@ SSyncNode* createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWa
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeStart
(
pSyncNode
);
syncNodeStart
(
pSyncNode
);
...
...
source/libs/sync/test/syncEnqTest.cpp
浏览文件 @
278cf9d3
...
@@ -38,15 +38,15 @@ SSyncNode* syncNodeInit() {
...
@@ -38,15 +38,15 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncIOSendMsgTest.cpp
浏览文件 @
278cf9d3
...
@@ -38,15 +38,15 @@ SSyncNode* syncNodeInit() {
...
@@ -38,15 +38,15 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncInitTest.cpp
浏览文件 @
278cf9d3
...
@@ -38,14 +38,14 @@ SSyncNode* syncNodeInit() {
...
@@ -38,14 +38,14 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncPingSelfTest.cpp
浏览文件 @
278cf9d3
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncPingTimerTest.cpp
浏览文件 @
278cf9d3
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncPingTimerTest2.cpp
浏览文件 @
278cf9d3
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncReplicateTest.cpp
浏览文件 @
278cf9d3
...
@@ -120,16 +120,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
...
@@ -120,16 +120,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeRelease
(
pSyncNode
);
syncNodeRelease
(
pSyncNode
);
...
...
source/libs/sync/test/syncSnapshotTest.cpp
浏览文件 @
278cf9d3
...
@@ -116,14 +116,14 @@ SSyncNode *syncNodeInit() {
...
@@ -116,14 +116,14 @@ SSyncNode *syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeStart
(
pSyncNode
);
syncNodeStart
(
pSyncNode
);
...
...
source/libs/sync/test/syncTestTool.cpp
浏览文件 @
278cf9d3
...
@@ -257,16 +257,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
...
@@ -257,16 +257,16 @@ int64_t createSyncNode(int32_t replicaNum, int32_t myIndex, int32_t vgId, SWal*
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
SSyncNode
*
pSyncNode
=
(
SSyncNode
*
)
syncNodeAcquire
(
rid
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncSnapshot
=
pSyncNode
->
FpOnSnapshot
;
//
gSyncIO->FpOnSyncSnapshot = pSyncNode->FpOnSnapshot;
gSyncIO
->
FpOnSyncSnapshotReply
=
pSyncNode
->
FpOnSnapshotReply
;
//
gSyncIO->FpOnSyncSnapshotReply = pSyncNode->FpOnSnapshotReply;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeRelease
(
pSyncNode
);
syncNodeRelease
(
pSyncNode
);
...
...
source/libs/sync/test/syncVotesGrantedTest.cpp
浏览文件 @
278cf9d3
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
...
@@ -39,14 +39,14 @@ SSyncNode* syncNodeInit() {
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncVotesRespondTest.cpp
浏览文件 @
278cf9d3
...
@@ -40,14 +40,14 @@ SSyncNode* syncNodeInit() {
...
@@ -40,14 +40,14 @@ SSyncNode* syncNodeInit() {
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
return
pSyncNode
;
return
pSyncNode
;
...
...
source/libs/sync/test/syncWriteTest.cpp
浏览文件 @
278cf9d3
...
@@ -94,14 +94,14 @@ SSyncNode *syncNodeInit() {
...
@@ -94,14 +94,14 @@ SSyncNode *syncNodeInit() {
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
SSyncNode
*
pSyncNode
=
syncNodeOpen
(
&
syncInfo
);
assert
(
pSyncNode
!=
NULL
);
assert
(
pSyncNode
!=
NULL
);
gSyncIO
->
FpOnSyncPing
=
pSyncNode
->
FpOnPing
;
//
gSyncIO->FpOnSyncPing = pSyncNode->FpOnPing;
gSyncIO
->
FpOnSyncClientRequest
=
pSyncNode
->
FpOnClientRequest
;
//
gSyncIO->FpOnSyncClientRequest = pSyncNode->FpOnClientRequest;
gSyncIO
->
FpOnSyncPingReply
=
pSyncNode
->
FpOnPingReply
;
//
gSyncIO->FpOnSyncPingReply = pSyncNode->FpOnPingReply;
gSyncIO
->
FpOnSyncRequestVote
=
pSyncNode
->
FpOnRequestVote
;
//
gSyncIO->FpOnSyncRequestVote = pSyncNode->FpOnRequestVote;
gSyncIO
->
FpOnSyncRequestVoteReply
=
pSyncNode
->
FpOnRequestVoteReply
;
//
gSyncIO->FpOnSyncRequestVoteReply = pSyncNode->FpOnRequestVoteReply;
gSyncIO
->
FpOnSyncAppendEntries
=
pSyncNode
->
FpOnAppendEntries
;
//
gSyncIO->FpOnSyncAppendEntries = pSyncNode->FpOnAppendEntries;
gSyncIO
->
FpOnSyncAppendEntriesReply
=
pSyncNode
->
FpOnAppendEntriesReply
;
//
gSyncIO->FpOnSyncAppendEntriesReply = pSyncNode->FpOnAppendEntriesReply;
gSyncIO
->
FpOnSyncTimeout
=
pSyncNode
->
FpOnTimeout
;
//
gSyncIO->FpOnSyncTimeout = pSyncNode->FpOnTimeout;
gSyncIO
->
pSyncNode
=
pSyncNode
;
gSyncIO
->
pSyncNode
=
pSyncNode
;
syncNodeStart
(
pSyncNode
);
syncNodeStart
(
pSyncNode
);
...
...
source/libs/sync/test/sync_test_lib/inc/syncIO.h
浏览文件 @
278cf9d3
...
@@ -25,6 +25,7 @@ extern "C" {
...
@@ -25,6 +25,7 @@ extern "C" {
#include <stdlib.h>
#include <stdlib.h>
#include "os.h"
#include "os.h"
#include "syncInt.h"
#include "syncInt.h"
#include "syncTest.h"
#include "taosdef.h"
#include "taosdef.h"
#include "tqueue.h"
#include "tqueue.h"
#include "trpc.h"
#include "trpc.h"
...
@@ -32,6 +33,9 @@ extern "C" {
...
@@ -32,6 +33,9 @@ extern "C" {
#define TICK_Q_TIMER_MS 1000
#define TICK_Q_TIMER_MS 1000
#define TICK_Ping_TIMER_MS 1000
#define TICK_Ping_TIMER_MS 1000
typedef
struct
SyncPing
SyncPing
;
typedef
struct
SyncPingReply
SyncPingReply
;
typedef
struct
SSyncIO
{
typedef
struct
SSyncIO
{
STaosQueue
*
pMsgQ
;
STaosQueue
*
pMsgQ
;
STaosQset
*
pQset
;
STaosQset
*
pQset
;
...
...
source/libs/sync/test/sync_test_lib/inc/syncTest.h
浏览文件 @
278cf9d3
...
@@ -213,7 +213,6 @@ int32_t syncNodePingSelf(SSyncNode* pSyncNode);
...
@@ -213,7 +213,6 @@ int32_t syncNodePingSelf(SSyncNode* pSyncNode);
int32_t
syncNodePingPeers
(
SSyncNode
*
pSyncNode
);
int32_t
syncNodePingPeers
(
SSyncNode
*
pSyncNode
);
int32_t
syncNodePingAll
(
SSyncNode
*
pSyncNode
);
int32_t
syncNodePingAll
(
SSyncNode
*
pSyncNode
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
source/libs/sync/test/sync_test_lib/src/syncMainDebug.c
浏览文件 @
278cf9d3
...
@@ -138,20 +138,20 @@ cJSON* syncNode2Json(const SSyncNode* pSyncNode) {
...
@@ -138,20 +138,20 @@ cJSON* syncNode2Json(const SSyncNode* pSyncNode) {
cJSON_AddStringToObject
(
pRoot
,
"heartbeatTimerCounter"
,
u64buf
);
cJSON_AddStringToObject
(
pRoot
,
"heartbeatTimerCounter"
,
u64buf
);
// callback
// callback
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnPing
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnPing);
cJSON_AddStringToObject
(
pRoot
,
"FpOnPing"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnPing", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnPingReply
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnPingReply);
cJSON_AddStringToObject
(
pRoot
,
"FpOnPingReply"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnPingReply", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnRequestVote
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnRequestVote);
cJSON_AddStringToObject
(
pRoot
,
"FpOnRequestVote"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnRequestVote", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnRequestVoteReply
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnRequestVoteReply);
cJSON_AddStringToObject
(
pRoot
,
"FpOnRequestVoteReply"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnRequestVoteReply", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnAppendEntries
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnAppendEntries);
cJSON_AddStringToObject
(
pRoot
,
"FpOnAppendEntries"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnAppendEntries", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnAppendEntriesReply
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnAppendEntriesReply);
cJSON_AddStringToObject
(
pRoot
,
"FpOnAppendEntriesReply"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnAppendEntriesReply", u64buf);
snprintf
(
u64buf
,
sizeof
(
u64buf
),
"%p"
,
pSyncNode
->
FpOnTimeout
);
//
snprintf(u64buf, sizeof(u64buf), "%p", pSyncNode->FpOnTimeout);
cJSON_AddStringToObject
(
pRoot
,
"FpOnTimeout"
,
u64buf
);
//
cJSON_AddStringToObject(pRoot, "FpOnTimeout", u64buf);
// restoreFinish
// restoreFinish
cJSON_AddNumberToObject
(
pRoot
,
"restoreFinish"
,
pSyncNode
->
restoreFinish
);
cJSON_AddNumberToObject
(
pRoot
,
"restoreFinish"
,
pSyncNode
->
restoreFinish
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录