Merge pull request #18001 from taosdata/fix/sync
fix(sync): fix AddressSanitizer error
This commit is contained in:
commit
4646640a11
|
@ -1040,6 +1040,7 @@ void syncNodeClose(SSyncNode* pSyncNode) {
|
|||
|
||||
ret = raftStoreClose(pSyncNode->pRaftStore);
|
||||
ASSERT(ret == 0);
|
||||
pSyncNode->pRaftStore = NULL;
|
||||
|
||||
syncRespMgrDestroy(pSyncNode->pSyncRespMgr);
|
||||
pSyncNode->pSyncRespMgr = NULL;
|
||||
|
@ -2174,10 +2175,18 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
|
|||
SSyncNode* pSyncNode = pData->pSyncNode;
|
||||
SSyncTimer* pSyncTimer = pData->pTimer;
|
||||
|
||||
if (pSyncNode == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSyncNode->pRaftStore == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// sNTrace(pSyncNode, "eq peer hb timer");
|
||||
|
||||
int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock);
|
||||
|
|
Loading…
Reference in New Issue