refacotr(sync): judge peer state null
This commit is contained in:
parent
984af8a877
commit
3c94d61493
|
@ -3453,7 +3453,9 @@ SPeerState* syncNodeGetPeerState(SSyncNode* ths, const SRaftId* pDestId) {
|
|||
|
||||
bool syncNodeNeedSendAppendEntries(SSyncNode* ths, const SRaftId* pDestId, const SyncAppendEntries* pMsg) {
|
||||
SPeerState* pState = syncNodeGetPeerState(ths, pDestId);
|
||||
ASSERT(pState != NULL);
|
||||
if (pState == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SyncIndex sendIndex = pMsg->prevLogIndex + 1;
|
||||
int64_t tsNow = taosGetTimestampMs();
|
||||
|
|
Loading…
Reference in New Issue