enh: reset sync log repl mgr on snapshot ending
This commit is contained in:
parent
143a2e8552
commit
b63afcd52f
|
@ -879,11 +879,10 @@ int32_t syncNodeOnSnapshotReply(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
|
||||||
// receive ack is finish, close sender
|
// receive ack is finish, close sender
|
||||||
if (pMsg->ack == SYNC_SNAPSHOT_SEQ_END) {
|
if (pMsg->ack == SYNC_SNAPSHOT_SEQ_END) {
|
||||||
snapshotSenderStop(pSender, true);
|
snapshotSenderStop(pSender, true);
|
||||||
|
SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pSyncNode, &pMsg->srcId);
|
||||||
// update next-index
|
if (pMgr) {
|
||||||
// syncIndexMgrSetIndex(pSyncNode->pNextIndex, &(pMsg->srcId), pMsg->lastIndex + 1);
|
syncLogReplMgrReset(pMgr);
|
||||||
// syncNodeReplicateOne(pSyncNode, &(pMsg->srcId), false);
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue