ehn/add-sync-msg-statis
This commit is contained in:
parent
e57a914f00
commit
daa3c6bbf4
|
@ -88,15 +88,20 @@ int32_t syncNodeSendAppendEntries(SSyncNode* pSyncNode, const SRaftId* destRaftI
|
||||||
pMsg->destId = *destRaftId;
|
pMsg->destId = *destRaftId;
|
||||||
TAOS_CHECK_RETURN(syncNodeSendMsgById(destRaftId, pSyncNode, pRpcMsg));
|
TAOS_CHECK_RETURN(syncNodeSendMsgById(destRaftId, pSyncNode, pRpcMsg));
|
||||||
|
|
||||||
int32_t nRef = atomic_fetch_add_32(&pSyncNode->sendCount, 1);
|
int32_t nRef = 0;
|
||||||
if (nRef <= 0) {
|
if (pSyncNode != NULL) {
|
||||||
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
nRef = atomic_fetch_add_32(&pSyncNode->sendCount, 1);
|
||||||
|
if (nRef <= 0) {
|
||||||
|
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SSyncLogReplMgr* mgr = syncNodeGetLogReplMgr(pSyncNode, (SRaftId*)destRaftId);
|
SSyncLogReplMgr* mgr = syncNodeGetLogReplMgr(pSyncNode, (SRaftId*)destRaftId);
|
||||||
nRef = atomic_fetch_add_32(&mgr->sendCount, 1);
|
if (mgr != NULL) {
|
||||||
if (nRef <= 0) {
|
nRef = atomic_fetch_add_32(&mgr->sendCount, 1);
|
||||||
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
if (nRef <= 0) {
|
||||||
|
sError("vgId:%d, send count is %d", pSyncNode->vgId, nRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||||
|
|
Loading…
Reference in New Issue