sync refactor
This commit is contained in:
parent
5e1e65ca30
commit
b8aa420e3a
|
@ -31,11 +31,11 @@ extern "C" {
|
|||
|
||||
typedef struct SSyncIO {
|
||||
STaosQueue *pMsgQ;
|
||||
STaosQset * pQset;
|
||||
STaosQset *pQset;
|
||||
pthread_t consumerTid;
|
||||
|
||||
void * serverRpc;
|
||||
void * clientRpc;
|
||||
void *serverRpc;
|
||||
void *clientRpc;
|
||||
SEpSet myAddr;
|
||||
|
||||
void *ioTimerTickQ;
|
||||
|
|
|
@ -192,9 +192,9 @@ void syncNodeClose(SSyncNode* pSyncNode);
|
|||
int32_t syncNodeSendMsgById(const SRaftId* destRaftId, SSyncNode* pSyncNode, SRpcMsg* pMsg);
|
||||
int32_t syncNodeSendMsgByInfo(const SNodeInfo* nodeInfo, SSyncNode* pSyncNode, SRpcMsg* pMsg);
|
||||
int32_t syncNodePing(SSyncNode* pSyncNode, const SRaftId* destRaftId, SyncPing* pMsg);
|
||||
void syncNodePingAll(SSyncNode* pSyncNode);
|
||||
void syncNodePingPeers(SSyncNode* pSyncNode);
|
||||
void syncNodePingSelf(SSyncNode* pSyncNode);
|
||||
int32_t syncNodePingAll(SSyncNode* pSyncNode);
|
||||
int32_t syncNodePingPeers(SSyncNode* pSyncNode);
|
||||
int32_t syncNodePingSelf(SSyncNode* pSyncNode);
|
||||
|
||||
int32_t syncNodeStartPingTimer(SSyncNode* pSyncNode);
|
||||
int32_t syncNodeStopPingTimer(SSyncNode* pSyncNode);
|
||||
|
|
|
@ -177,7 +177,7 @@ int32_t syncNodePing(SSyncNode* pSyncNode, const SRaftId* destRaftId, SyncPing*
|
|||
return ret;
|
||||
}
|
||||
|
||||
void syncNodePingAll(SSyncNode* pSyncNode) {
|
||||
int32_t syncNodePingAll(SSyncNode* pSyncNode) {
|
||||
sTrace("syncNodePingAll pSyncNode:%p ", pSyncNode);
|
||||
int32_t ret = 0;
|
||||
for (int i = 0; i < pSyncNode->syncCfg.replicaNum; ++i) {
|
||||
|
@ -190,7 +190,7 @@ void syncNodePingAll(SSyncNode* pSyncNode) {
|
|||
}
|
||||
}
|
||||
|
||||
void syncNodePingPeers(SSyncNode* pSyncNode) {
|
||||
int32_t syncNodePingPeers(SSyncNode* pSyncNode) {
|
||||
int32_t ret = 0;
|
||||
for (int i = 0; i < pSyncNode->peersNum; ++i) {
|
||||
SRaftId destId;
|
||||
|
@ -202,7 +202,7 @@ void syncNodePingPeers(SSyncNode* pSyncNode) {
|
|||
}
|
||||
}
|
||||
|
||||
void syncNodePingSelf(SSyncNode* pSyncNode) {
|
||||
int32_t syncNodePingSelf(SSyncNode* pSyncNode) {
|
||||
int32_t ret;
|
||||
SyncPing* pMsg = syncPingBuild3(&pSyncNode->raftId, &pSyncNode->raftId);
|
||||
ret = syncNodePing(pSyncNode, &pMsg->destId, pMsg);
|
||||
|
|
Loading…
Reference in New Issue