fix: use recovery snapshot checkpoint if no vchannel is on-recovering (#44246)

issue: #44194

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-09-10 14:15:56 +08:00 committed by GitHub
parent cbe4c3d231
commit 3b01388587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {