From 3b013885874be99c95922cc63e21a3605e24b1bb Mon Sep 17 00:00:00 2001 From: Zhen Ye Date: Wed, 10 Sep 2025 14:15:56 +0800 Subject: [PATCH] fix: use recovery snapshot checkpoint if no vchannel is on-recovering (#44246) issue: #44194 Signed-off-by: chyezh --- .../streamingnode/server/flusher/flusherimpl/wal_flusher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/streamingnode/server/flusher/flusherimpl/wal_flusher.go b/internal/streamingnode/server/flusher/flusherimpl/wal_flusher.go index 3e8514ed44..680d75ac35 100644 --- a/internal/streamingnode/server/flusher/flusherimpl/wal_flusher.go +++ b/internal/streamingnode/server/flusher/flusherimpl/wal_flusher.go @@ -139,6 +139,10 @@ func (impl *WALFlusherImpl) buildFlusherComponents(ctx context.Context, l wal.WA return nil, nil, err } impl.logger.Info("fetch recovery info done", zap.Int("recoveryInfoNum", len(recoverInfos))) + if len(vchannels) == 0 && checkpoint == nil { + impl.logger.Info("no vchannel to recover, use the snapshot checkpoint", zap.Stringer("checkpoint", snapshot.Checkpoint.MessageID)) + checkpoint = snapshot.Checkpoint.MessageID + } mixc, err := resource.Resource().MixCoordClient().GetWithContext(ctx) if err != nil {