From c5cde7ffe8f3da786326f2056ffc79c2f2cd1ae3 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 12 Dec 2023 18:34:59 +0800 Subject: [PATCH] enh: resend new snap replication msg on all acked if not finished yet --- source/libs/sync/src/syncSnapshot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c index 93e81fd8e2..98cabca521 100644 --- a/source/libs/sync/src/syncSnapshot.c +++ b/source/libs/sync/src/syncSnapshot.c @@ -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;