enh: resend new snap replication msg on all acked if not finished yet

This commit is contained in:
Benguang Zhao 2023-12-12 18:34:59 +08:00
parent b1dd76b924
commit c5cde7ffe8
1 changed files with 6 additions and 0 deletions

View File

@ -338,6 +338,12 @@ int32_t snapshotReSend(SSyncSnapshotSender *pSender) {
pBlk->sendTimeMs = nowMs;
}
if (pSender->seq != SYNC_SNAPSHOT_SEQ_END && pSndBuf->end <= pSndBuf->start) {
if (snapshotSend(pSender) != 0) {
goto _out;
}
}
if (pSender->seq == SYNC_SNAPSHOT_SEQ_END && pSndBuf->end <= pSndBuf->start) {
if (syncSnapSendMsg(pSender, pSender->seq, NULL, 0, 0) != 0) {
goto _out;