enh: reset sync log repl mgr on snapshot ending

This commit is contained in:
Benguang Zhao 2022-11-25 23:32:32 +08:00
parent 143a2e8552
commit b63afcd52f
1 changed files with 4 additions and 5 deletions

View File

@ -879,11 +879,10 @@ int32_t syncNodeOnSnapshotReply(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
// receive ack is finish, close sender
if (pMsg->ack == SYNC_SNAPSHOT_SEQ_END) {
snapshotSenderStop(pSender, true);
// update next-index
// syncIndexMgrSetIndex(pSyncNode->pNextIndex, &(pMsg->srcId), pMsg->lastIndex + 1);
// syncNodeReplicateOne(pSyncNode, &(pMsg->srcId), false);
SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pSyncNode, &pMsg->srcId);
if (pMgr) {
syncLogReplMgrReset(pMgr);
}
return 0;
}