diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index b77652bc81499392719cc144d08f20c65a79a006..481733cd177762a8553705a7004d461f3bbd56ba 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -3375,8 +3375,12 @@ int32_t syncNodeDoCommit(SSyncNode* ths, SyncIndex beginIndex, SyncIndex endInde pEntry = (SSyncRaftEntry*)taosLRUCacheValue(pCache, h); } else { code = ths->pLogStore->syncLogGetEntry(ths->pLogStore, i, &pEntry); - ASSERT(code == 0); - ASSERT(pEntry != NULL); + // ASSERT(code == 0); + // ASSERT(pEntry != NULL); + if (code != 0 || pEntry == NULL) { + syncNodeErrorLog(ths, "get log entry error"); + continue; + } } SRpcMsg rpcMsg; @@ -3737,4 +3741,4 @@ void syncLogRecvHeartbeatReply(SSyncNode* pSyncNode, const SyncHeartbeatReply* p snprintf(logBuf, sizeof(logBuf), "recv sync-heartbeat-reply from %s:%d {term:%" PRIu64 ", pterm:%" PRIu64 "}, %s", host, port, pMsg->term, pMsg->privateTerm, s); syncNodeEventLog(pSyncNode, logBuf); -} \ No newline at end of file +}